mirror of
https://github.com/GNOME/libxml2.git
synced 2025-04-06 19:20:23 +08:00
another fix for nodeinfo in entities problem fixed bug #106788 from James
* parser.c: another fix for nodeinfo in entities problem * tree.c entities.c: fixed bug #106788 from James Clark some spaces need to be serialized as character references. Daniel
This commit is contained in:
parent
40ed73b73d
commit
0046c0fec2
@ -1,3 +1,9 @@
|
||||
Sun Feb 23 14:49:39 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* parser.c: another fix for nodeinfo in entities problem
|
||||
* tree.c entities.c: fixed bug #106788 from James Clark
|
||||
some spaces need to be serialized as character references.
|
||||
|
||||
Sat Feb 22 18:28:16 CET 2003 Igor Zlatkovic <igor@zlatkovic.com>
|
||||
|
||||
* parser.c uri.c: fixed the bug I introduced in the path
|
||||
|
@ -649,7 +649,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
||||
*out++ = ';';
|
||||
#endif
|
||||
} else if (((*cur >= 0x20) && (*cur < 0x80)) ||
|
||||
(*cur == '\n') || (*cur == '\r') || (*cur == '\t')) {
|
||||
(*cur == '\n') || (*cur == '\t') || ((html) && (*cur == '\r'))) {
|
||||
/*
|
||||
* default case, just copy !
|
||||
*/
|
||||
|
3
parser.c
3
parser.c
@ -9819,6 +9819,9 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
|
||||
}
|
||||
if (sax != NULL)
|
||||
ctxt->sax = oldsax;
|
||||
oldctxt->node_seq.maximum = ctxt->node_seq.maximum;
|
||||
oldctxt->node_seq.length = ctxt->node_seq.length;
|
||||
oldctxt->node_seq.buffer = ctxt->node_seq.buffer;
|
||||
ctxt->node_seq.maximum = 0;
|
||||
ctxt->node_seq.length = 0;
|
||||
ctxt->node_seq.buffer = NULL;
|
||||
|
12
tree.c
12
tree.c
@ -6454,6 +6454,18 @@ xmlAttrSerializeContent(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr attr)
|
||||
xmlBufferAdd(buf, BAD_CAST " ", 5);
|
||||
cur++;
|
||||
base = cur;
|
||||
} else if (*cur == '\r') {
|
||||
if (base != cur)
|
||||
xmlBufferAdd(buf, base, cur - base);
|
||||
xmlBufferAdd(buf, BAD_CAST " ", 6);
|
||||
cur++;
|
||||
base = cur;
|
||||
} else if (*cur == '\t') {
|
||||
if (base != cur)
|
||||
xmlBufferAdd(buf, base, cur - base);
|
||||
xmlBufferAdd(buf, BAD_CAST "	", 5);
|
||||
cur++;
|
||||
base = cur;
|
||||
#if 0
|
||||
} else if (*cur == '\'') {
|
||||
if (base != cur)
|
||||
|
Loading…
x
Reference in New Issue
Block a user