Commit 2f6ff81a authored by Daniel Veillard's avatar Daniel Veillard
Browse files

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
parent f88d8cf9
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> Mon Dec 8 11:08:45 CET 2003 Daniel Veillard <daniel@veillard.com>
   
* python/libxml.py: tried to fix the problems reported in * python/libxml.py: tried to fix the problems reported in
......
...@@ -7699,9 +7699,13 @@ xmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur, ...@@ -7699,9 +7699,13 @@ xmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
xmlDtdPtr dtd; xmlDtdPtr dtd;
int is_xhtml = 0; int is_xhtml = 0;
#endif #endif
const xmlChar *oldenc = cur->encoding;
xmlInitParser(); xmlInitParser();
if (encoding != NULL)
cur->encoding = BAD_CAST encoding;
xmlOutputBufferWriteString(buf, "<?xml version="); xmlOutputBufferWriteString(buf, "<?xml version=");
if (cur->version != NULL) if (cur->version != NULL)
xmlBufferWriteQuotedString(buf->buffer, cur->version); xmlBufferWriteQuotedString(buf->buffer, cur->version);
...@@ -7754,6 +7758,8 @@ xmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur, ...@@ -7754,6 +7758,8 @@ xmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
child = child->next; child = child->next;
} }
} }
if (encoding != NULL)
cur->encoding = oldenc;
} }
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment