Skip to content

Commit

Permalink
doc: add TODO item for symbol html
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanceras committed Mar 28, 2024
1 parent ec6e6b7 commit 5ca97b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,19 @@
view: Node<MSG> ,
}
```
- [ ] remove `SafeHtml` variant in leaf, instead provide a safe_html which is parsed and converted into node
- [X] remove `SafeHtml` variant in leaf, instead provide a safe_html which is parsed and converted into node
- using safe html alters the dom tree
- [ ] remove `innerHTML` func in AttributeValue as it could alter the DOM node tree
- [ ] add `symbol_html` for html entities such as `&nbsp;` `&gt`, `&lt` etc.
- this should be safe to be inserted
- [X] remove `innerHTML` func in AttributeValue as it could alter the DOM node tree
- [ ] Keep track of which attributes to be skipped in `SkipDiff{shall:false}`
```rust
enum SkipStrat{
SkipAll,
SkippIndex(Vec<usize>),
}
```
- [ ] Maybe disable the template usage for now
- [X] Maybe disable the template usage for now

## Features
- [X] Storage service (May not be needed since the user can directly use web-sys)
Expand Down
3 changes: 3 additions & 0 deletions crates/html-parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ pub fn parse_html<MSG>(html: &str) -> Result<Option<Node<MSG>>, ParseError> {
process_node(doc.get_root_node().borrow().deref())
}

//TODO: This is not dealing with html symbols such as
// `&#9650;`
// `&#9660;`
fn process_node<MSG>(node: &rphtml::parser::Node) -> Result<Option<Node<MSG>>, ParseError> {
let content = if let Some(content) = &node.content {
let content = String::from_iter(content.iter());
Expand Down

0 comments on commit 5ca97b2

Please sign in to comment.