1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00

tentative fix for #126117 character reference in attributes output problem

* tree.c: tentative fix for #126117 character reference in
  attributes output problem in some cornercase.
Daniel
This commit is contained in:
Daniel Veillard 2003-12-08 12:11:14 +00:00
parent f88d8cf9f1
commit 2f6ff81a4a
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Mon Dec 8 13:09:39 CET 2003 Daniel Veillard <daniel@veillard.com>
* tree.c: tentative fix for #126117 character reference in
attributes output problem in some cornercase.
Mon Dec 8 11:08:45 CET 2003 Daniel Veillard <daniel@veillard.com>
* python/libxml.py: tried to fix the problems reported in

6
tree.c
View File

@ -7699,9 +7699,13 @@ xmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
xmlDtdPtr dtd;
int is_xhtml = 0;
#endif
const xmlChar *oldenc = cur->encoding;
xmlInitParser();
if (encoding != NULL)
cur->encoding = BAD_CAST encoding;
xmlOutputBufferWriteString(buf, "<?xml version=");
if (cur->version != NULL)
xmlBufferWriteQuotedString(buf->buffer, cur->version);
@ -7754,6 +7758,8 @@ xmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
child = child->next;
}
}
if (encoding != NULL)
cur->encoding = oldenc;
}
#endif /* LIBXML_OUTPUT_ENABLED */