mirror of
https://github.com/GNOME/libxml2.git
synced 2025-03-25 19:01:31 +08:00
Chip turner indicated that XHTML1 serialization rule for style actually
* tree.c: Chip turner indicated that XHTML1 serialization rule for style actually break on both IE and Mozilla, try to avoid the rule if escaping ain't necessary Daniel
This commit is contained in:
parent
8efff67157
commit
64b3528286
@ -1,3 +1,9 @@
|
||||
Wed Dec 4 16:08:49 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* tree.c: Chip turner indicated that XHTML1 serialization
|
||||
rule for style actually break on both IE and Mozilla,
|
||||
try to avoid the rule if escaping ain't necessary
|
||||
|
||||
Wed Dec 4 12:43:28 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* nanhttp.c: handle HTTP URL escaping, problem reported by
|
||||
|
21
tree.c
21
tree.c
@ -7092,11 +7092,22 @@ xhtmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
||||
while (child != NULL) {
|
||||
if ((child->type == XML_TEXT_NODE) ||
|
||||
(child->type == XML_CDATA_SECTION_NODE)) {
|
||||
xmlOutputBufferWriteString(buf, "<![CDATA[");
|
||||
if (child->content != NULL)
|
||||
xmlOutputBufferWriteString(buf,
|
||||
(const char *)child->content);
|
||||
xmlOutputBufferWriteString(buf, "]]>");
|
||||
/*
|
||||
* Apparently CDATA escaping for style just break on IE,
|
||||
* mozilla and galeon, so ...
|
||||
*/
|
||||
if (xmlStrEqual(cur->name, BAD_CAST "style") &&
|
||||
(xmlStrchr(child->content, '<') == NULL) &&
|
||||
(xmlStrchr(child->content, '>') == NULL) &&
|
||||
(xmlStrchr(child->content, '&') == NULL)) {
|
||||
xhtmlNodeDumpOutput(buf, doc, child, 0, 0, encoding);
|
||||
} else {
|
||||
xmlOutputBufferWriteString(buf, "<![CDATA[");
|
||||
if (child->content != NULL)
|
||||
xmlOutputBufferWriteString(buf,
|
||||
(const char *)child->content);
|
||||
xmlOutputBufferWriteString(buf, "]]>");
|
||||
}
|
||||
} else {
|
||||
xhtmlNodeDumpOutput(buf, doc, child, 0, 0, encoding);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user