From 44892f73ddbcd0e939a6405c4c752498c877b09d Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 16 Oct 2002 15:23:26 +0000 Subject: [PATCH] fixed serialization of script and style when they are not lowercase (i.e. * HTMLtree.c: fixed serialization of script and style when they are not lowercase (i.e. added using the API to the tree). Daniel --- ChangeLog | 5 +++++ HTMLtree.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2f1a00a..5d83ff0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Oct 16 17:18:42 CEST 2002 Daniel Veillard + + * HTMLtree.c: fixed serialization of script and style when + they are not lowercase (i.e. added using the API to the tree). + Wed Oct 16 16:31:05 CEST 2002 Daniel Veillard * valid.c: make xmlValidateDocument emit a warning msg if there diff --git a/HTMLtree.c b/HTMLtree.c index cbd0ef0c..7650184b 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -492,8 +492,8 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, if (((cur->name == (const xmlChar *)xmlStringText) || (cur->name != (const xmlChar *)xmlStringTextNoenc)) && ((cur->parent == NULL) || - ((!xmlStrEqual(cur->parent->name, BAD_CAST "script")) && - (!xmlStrEqual(cur->parent->name, BAD_CAST "style"))))) { + ((xmlStrcasecmp(cur->parent->name, BAD_CAST "script")) && + (xmlStrcasecmp(cur->parent->name, BAD_CAST "style"))))) { xmlChar *buffer; buffer = xmlEncodeEntitiesReentrant(doc, cur->content); @@ -983,8 +983,8 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, if (((cur->name == (const xmlChar *)xmlStringText) || (cur->name != (const xmlChar *)xmlStringTextNoenc)) && ((cur->parent == NULL) || - ((!xmlStrEqual(cur->parent->name, BAD_CAST "script")) && - (!xmlStrEqual(cur->parent->name, BAD_CAST "style"))))) { + ((xmlStrcasecmp(cur->parent->name, BAD_CAST "script")) && + (xmlStrcasecmp(cur->parent->name, BAD_CAST "style"))))) { xmlChar *buffer; buffer = xmlEncodeEntitiesReentrant(doc, cur->content);