- HTMLtree.c: real fix for #53402

Daniel
This commit is contained in:
Daniel Veillard 2001-04-25 10:29:44 +00:00
parent 7533cc8fda
commit 5146f20c6c
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,7 @@
Wed Apr 25 12:28:57 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* HTMLtree.c: real fix for #53402
Tue Apr 24 17:36:35 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* HTMLtree.c HTMLtree.h : closing #53402 i.e. output of

View File

@ -516,15 +516,19 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
return;
}
if (cur->type == HTML_PI_NODE) {
if (cur->name == NULL)
return;
xmlBufferWriteChar(buf, "<?");
xmlBufferWriteCHAR(buf, cur->name);
if (cur->content != NULL) {
xmlBufferWriteChar(buf, "<?");
xmlBufferWriteChar(buf, " ");
#ifndef XML_USE_BUFFER_CONTENT
xmlBufferWriteCHAR(buf, cur->content);
#else
xmlBufferWriteCHAR(buf, xmlBufferContent(cur->content));
#endif
xmlBufferWriteChar(buf, ">");
}
xmlBufferWriteChar(buf, ">");
return;
}
if (cur->type == HTML_ENTITY_REF_NODE) {
@ -880,16 +884,20 @@ htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
return;
}
if (cur->type == HTML_PI_NODE) {
if (cur->name == NULL)
return;
xmlOutputBufferWriteString(buf, "<?");
xmlOutputBufferWriteString(buf, (const char *)cur->name);
if (cur->content != NULL) {
xmlOutputBufferWriteString(buf, "<?");
xmlOutputBufferWriteString(buf, " ");
#ifndef XML_USE_BUFFER_CONTENT
xmlOutputBufferWriteString(buf, (const char *)cur->content);
#else
xmlOutputBufferWriteString(buf, (const char *)
xmlBufferContent(cur->content));
#endif
xmlOutputBufferWriteString(buf, ">");
}
xmlOutputBufferWriteString(buf, ">");
return;
}
if (cur->type == HTML_ENTITY_REF_NODE) {