diff --git a/ChangeLog b/ChangeLog index 832b889e..d67cde64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Oct 17 17:56:31 CEST 2006 Daniel Veillard + + * HTMLparser.c: fixing HTML entities in attributes parsing bug #362552 + * result/HTML/entities2.html* test/HTML/entities2.html: added to + the regression suite + Tue Oct 17 01:21:37 CEST 2006 Daniel Veillard * xmllint.c: started to switch xmllint to use xmlSaveDoc to test diff --git a/HTMLparser.c b/HTMLparser.c index 1719c4c4..590083c1 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -2377,7 +2377,7 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) { growBuffer(buffer); out = &buffer[indx]; } - c = (xmlChar)ent->value; + c = ent->value; if (c < 0x80) { *out++ = c; bits= -6; } else if (c < 0x800) diff --git a/result/HTML/entities2.html b/result/HTML/entities2.html new file mode 100644 index 00000000..0b85cafc --- /dev/null +++ b/result/HTML/entities2.html @@ -0,0 +1,6 @@ + + +
+ +
+ diff --git a/result/HTML/entities2.html.err b/result/HTML/entities2.html.err new file mode 100644 index 00000000..e69de29b diff --git a/result/HTML/entities2.html.sax b/result/HTML/entities2.html.sax new file mode 100644 index 00000000..c6efbe53 --- /dev/null +++ b/result/HTML/entities2.html.sax @@ -0,0 +1,23 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.startElement(html) +SAX.ignorableWhitespace( +, 1) +SAX.startElement(body) +SAX.characters( +, 1) +SAX.startElement(form) +SAX.characters( + , 3) +SAX.startElement(input, type='text', name='test', value='š') +SAX.endElement(input) +SAX.characters( +, 1) +SAX.endElement(form) +SAX.characters( +, 1) +SAX.endElement(body) +SAX.ignorableWhitespace( +, 1) +SAX.endElement(html) +SAX.endDocument() diff --git a/test/HTML/entities2.html b/test/HTML/entities2.html new file mode 100644 index 00000000..53cc7b01 --- /dev/null +++ b/test/HTML/entities2.html @@ -0,0 +1,7 @@ + + +
+ +
+ + \ No newline at end of file