Open cmwoods opened 11 years ago
Changed CreateHtmlElementSetAsRoot in XmlTreeBuilder.cs to have the following within the for loop (hack for error):
string uri = attributes.GetURI(i);
if (attributes.GetLocalName(i) == "xmlns" && string.IsNullOrWhiteSpace(uri))
{
uri = "http://www.w3.org/2000/xmlns/";
}
rv.SetAttribute(attributes.GetLocalName(i), uri, attributes.GetValue(i));
I don't know if this is actually the correct thing to do or not but it at least gets around the issue.
@jamietre Read https://html.spec.whatwg.org/multipage/syntax.html#attributes-2.
I'm getting the following exception thrown when the HTML element contains the XMLNS attribute (in XHTML document):
It looks like the code is not particularly expecting XHTML input and therefore doesn't have a special case for the handling of this attribute.