Closed dwarring closed 1 year ago
I suspect we're better of to call htmlNodeDumpFormatOutput
directly.
Calling serialize-html
on a non-html document should either be protected (with the document type temporarily changed), or deprecated.
Fixed in LibXML 0.94 release. This serializes HTML via the more modern xmlSaveTree()
with the XML_SAVE_XHTML
flag set.
Just looking at this in more detail.
htmlDocContentDumpFormatOutput
htmlGetMetaEncoding
, but the bindings are assuming utf-8htmlDocContentDumpFormatOutput
which temporarily sets the document type tohtmlDocContentDumpFormatOutput
, then callshtmlNodeDumpFormatOutput
So its both setting the encoding and mutating the raw type of the document.