mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
do not output hexadecimal charrefs when serializing HTML since some
* encoding.c entities.c: do not output hexadecimal charrefs when serializing HTML since some version of Netscape can't grok it, generate decimal ones. * result/HTML/doc3.htm: output changed due to previous test * parserInternals.c: repair xmlKeepBlanksDefault() broken in 2.4.4 Daniel
This commit is contained in:
@ -708,7 +708,10 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
||||
/*
|
||||
* We could do multiple things here. Just save as a char ref
|
||||
*/
|
||||
snprintf(buf, sizeof(buf), "&#x%X;", val);
|
||||
if (html)
|
||||
snprintf(buf, sizeof(buf), "&#%d;", val);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "&#x%X;", val);
|
||||
buf[sizeof(buf) - 1] = 0;
|
||||
ptr = buf;
|
||||
while (*ptr != 0) *out++ = *ptr++;
|
||||
|
Reference in New Issue
Block a user