Fixed bug where xlmns namespace was inserted for raw els
@@ -366,8 +366,11 @@ pub fn el_from_ws<Ms>(node: &web_sys::Node) -> Option<El<Ms>> {
result.attrs = attrs;
if let Some(ns) = el_ws.namespace_uri() {
+ // Prevent attaching a `xlmns` attribute to normal HTML elements.
+ if ns != "http://www.w3.org/1999/xhtml" {
result.namespace = Some(ns.into());
}
+ }
let children = el_ws.child_nodes();
for i in 0..children.length() {
@@ -383,7 +386,7 @@ pub fn el_from_ws<Ms>(node: &web_sys::Node) -> Option<El<Ms>> {
}
3 => Some(El::new_text(&node.text_content().expect("Can't find text"))),
_ => {
- crate::log("Unexpected node type found from raw html");
+ crate::error("Unexpected node type found from raw html");
None
}
}
