mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
xhtml: Panic on unknown elements still present after parsing.
This commit is contained in:
parent
24e862e352
commit
cde011aa5e
1 changed files with 2 additions and 2 deletions
|
@ -241,7 +241,7 @@ impl Tag {
|
|||
let style = write_attr(get_style_string(style), "style");
|
||||
format!("<ul{}>{}</ul>", style, children_to_html(children))
|
||||
}
|
||||
Tag::Unknown(children) => children_to_html(children),
|
||||
Tag::Unknown(children) => panic!("No unknown element should be present in XHTML-IM after parsing."),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ impl From<Tag> for Element {
|
|||
Some(style) => vec![("style", style)],
|
||||
None => vec![],
|
||||
}, children),
|
||||
Tag::Unknown(children) => return Element::builder("unknown").ns(ns::XHTML).append(children_to_nodes(children)).build(),
|
||||
Tag::Unknown(children) => panic!("No unknown element should be present in XHTML-IM after parsing."),
|
||||
};
|
||||
let mut builder = Element::builder(name)
|
||||
.ns(ns::XHTML)
|
||||
|
|
Loading…
Reference in a new issue