mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +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,
|
const char *encoding ATTRIBUTE_UNUSED,
|
||||||
int format) {
|
int format) {
|
||||||
int type = 0;
|
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) {
|
if (cur) {
|
||||||
type = cur->type;
|
type = cur->type;
|
||||||
cur->type = XML_HTML_DOCUMENT_NODE;
|
cur->type = XML_HTML_DOCUMENT_NODE;
|
||||||
|
|||||||
Reference in New Issue
Block a user