summaryrefslogtreecommitdiff
path: root/entities.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-09-14 10:29:27 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-09-14 10:29:27 +0000
commit166982816ee63ec70e8bdcabcdf337b1fe9e1e80 (patch)
treeba99d23b3a5a3067d9711f1d156c2c9138829848 /entities.c
parent008186fc7fe681c4fa0abd831bc4cb244f46ab01 (diff)
downloadlibxml2-166982816ee63ec70e8bdcabcdf337b1fe9e1e80.tar.gz
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
Diffstat (limited to 'entities.c')
-rw-r--r--entities.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/entities.c b/entities.c
index afa871b6..a2306665 100644
--- a/entities.c
+++ b/entities.c
@@ -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++;