mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-07 06:43:02 +03:00
trying to fix #104934 about some XHTML1 serialization issues. Daniel
* tree.c: trying to fix #104934 about some XHTML1 serialization issues. Daniel
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
Mon Feb 10 17:11:22 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* tree.c: trying to fix #104934 about some XHTML1 serialization
|
||||||
|
issues.
|
||||||
|
|
||||||
Mon Feb 10 16:41:13 CET 2003 Daniel Veillard <daniel@veillard.com>
|
Mon Feb 10 16:41:13 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* encoding.c xmlIO.c: fixing bug #104646 about iconv based
|
* encoding.c xmlIO.c: fixing bug #104646 about iconv based
|
||||||
|
15
tree.c
15
tree.c
@@ -6670,7 +6670,7 @@ xmlNodeDumpOutputInternal(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cur->type == XML_NAMESPACE_DECL) {
|
if (cur->type == XML_NAMESPACE_DECL) {
|
||||||
xmlNsDumpOutput(buf, cur);
|
xmlNsDumpOutput(buf, (xmlNsPtr) cur);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6980,6 +6980,7 @@ xhtmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
|||||||
xmlAttrPtr lang = NULL;
|
xmlAttrPtr lang = NULL;
|
||||||
xmlAttrPtr name = NULL;
|
xmlAttrPtr name = NULL;
|
||||||
xmlAttrPtr id = NULL;
|
xmlAttrPtr id = NULL;
|
||||||
|
xmlNodePtr parent;
|
||||||
|
|
||||||
if (cur == NULL) {
|
if (cur == NULL) {
|
||||||
#ifdef DEBUG_TREE
|
#ifdef DEBUG_TREE
|
||||||
@@ -6988,6 +6989,7 @@ xhtmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
|||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
parent = cur->parent;
|
||||||
while (cur != NULL) {
|
while (cur != NULL) {
|
||||||
if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "id")))
|
if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "id")))
|
||||||
id = cur;
|
id = cur;
|
||||||
@@ -7019,10 +7021,21 @@ xhtmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
|||||||
* C.8
|
* C.8
|
||||||
*/
|
*/
|
||||||
if ((name != NULL) && (id == NULL)) {
|
if ((name != NULL) && (id == NULL)) {
|
||||||
|
if ((parent != NULL) && (parent->name != NULL) &&
|
||||||
|
((xmlStrEqual(parent->name, BAD_CAST "a")) ||
|
||||||
|
(xmlStrEqual(parent->name, BAD_CAST "p")) ||
|
||||||
|
(xmlStrEqual(parent->name, BAD_CAST "div")) ||
|
||||||
|
(xmlStrEqual(parent->name, BAD_CAST "img")) ||
|
||||||
|
(xmlStrEqual(parent->name, BAD_CAST "map")) ||
|
||||||
|
(xmlStrEqual(parent->name, BAD_CAST "applet")) ||
|
||||||
|
(xmlStrEqual(parent->name, BAD_CAST "form")) ||
|
||||||
|
(xmlStrEqual(parent->name, BAD_CAST "frame")) ||
|
||||||
|
(xmlStrEqual(parent->name, BAD_CAST "iframe")))) {
|
||||||
xmlOutputBufferWriteString(buf, " id=\"");
|
xmlOutputBufferWriteString(buf, " id=\"");
|
||||||
xmlAttrSerializeContent(buf->buffer, doc, name);
|
xmlAttrSerializeContent(buf->buffer, doc, name);
|
||||||
xmlOutputBufferWriteString(buf, "\"");
|
xmlOutputBufferWriteString(buf, "\"");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* C.7.
|
* C.7.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user