mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-23 01:52:48 +03:00
html: Add comment regarding hack for XML documents
This commit is contained in:
@@ -920,6 +920,15 @@ htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
||||
const char *encoding ATTRIBUTE_UNUSED,
|
||||
int format) {
|
||||
int type = 0;
|
||||
|
||||
/*
|
||||
* This is needed when serializing XML documents as HTML.
|
||||
* xmlEncodeEntitiesReentrant uses the document type to
|
||||
* determine the serialization mode.
|
||||
*
|
||||
* Once we call more low-level functions directly with
|
||||
* HTML flags, this hack can be removed.
|
||||
*/
|
||||
if (cur) {
|
||||
type = cur->type;
|
||||
cur->type = XML_HTML_DOCUMENT_NODE;
|
||||
|
||||
Reference in New Issue
Block a user