mirror of
https://github.com/darlinghq/darling-libxml2.git
synced 2025-03-03 08:29:33 +00:00
Mikhail Sogrine pointed out a bug in HTML parsing, applied his patch added
* HTMLparser.c: Mikhail Sogrine pointed out a bug in HTML parsing, applied his patch * result/HTML/attrents.html result/HTML/attrents.html.err result/HTML/attrents.html.sax test/HTML/attrents.html: added the test and result case provided by Mikhail Sogrine Daniel
This commit is contained in:
parent
e645e8c141
commit
ce02dbc430
@ -1,3 +1,11 @@
|
||||
Tue Oct 22 21:13:06 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* HTMLparser.c: Mikhail Sogrine pointed out a bug in HTML
|
||||
parsing, applied his patch
|
||||
* result/HTML/attrents.html result/HTML/attrents.html.err
|
||||
result/HTML/attrents.html.sax test/HTML/attrents.html:
|
||||
added the test and result case provided by Mikhail Sogrine
|
||||
|
||||
Tue Oct 22 19:33:20 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* vms/build_libxml.com vms/config.vms vms/readme.vms
|
||||
|
@ -1946,6 +1946,13 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) {
|
||||
for ( ; bits >= 0; bits-= 6) {
|
||||
*out++ = ((c >> bits) & 0x3F) | 0x80;
|
||||
}
|
||||
|
||||
if (out - buffer > buffer_size - 100) {
|
||||
int indx = out - buffer;
|
||||
|
||||
growBuffer(buffer);
|
||||
out = &buffer[indx];
|
||||
}
|
||||
} else {
|
||||
ent = htmlParseEntityRef(ctxt, &name);
|
||||
if (name == NULL) {
|
||||
|
4
result/HTML/attrents.html
Normal file
4
result/HTML/attrents.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html><body bgcolor="#FFFFFF">
|
||||
<a href="mailto:katherine@cbfanc.org%2Cwebsite@bis.doc.gov?subject=South%20San%20Francisco%20BIS%20Seminar%20-%20October%2016th"></a><br>
|
||||
</body></html>
|
0
result/HTML/attrents.html.err
Normal file
0
result/HTML/attrents.html.err
Normal file
21
result/HTML/attrents.html.sax
Normal file
21
result/HTML/attrents.html.sax
Normal file
@ -0,0 +1,21 @@
|
||||
SAX.setDocumentLocator()
|
||||
SAX.startDocument()
|
||||
SAX.startElement(html)
|
||||
SAX.ignorableWhitespace(
|
||||
, 2)
|
||||
SAX.startElement(body, bgcolor='#FFFFFF')
|
||||
SAX.ignorableWhitespace(
|
||||
, 18)
|
||||
SAX.startElement(a, href='mailto:katherine@cbfanc.org,website@bis.doc.gov?subject=South San Francisco BIS Seminar - October 16th')
|
||||
SAX.endElement(a)
|
||||
SAX.startElement(br)
|
||||
SAX.endElement(br)
|
||||
SAX.ignorableWhitespace(
|
||||
, 2)
|
||||
SAX.endElement(body)
|
||||
SAX.ignorableWhitespace(
|
||||
, 2)
|
||||
SAX.endElement(html)
|
||||
SAX.ignorableWhitespace(
|
||||
, 2)
|
||||
SAX.endDocument()
|
5
test/HTML/attrents.html
Normal file
5
test/HTML/attrents.html
Normal file
@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<a href="mailto:katherine@cbfanc.org,website@bis.doc.gov?subject=South San Francisco BIS Seminar - October 16th"></a><br>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user