1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-17 18:21:05 +03:00

fixing HTML minimized attribute values to be generated internally if not

* HTMLparser.c: fixing HTML minimized attribute values to be generated
  internally if not present, fixes bug #332124
* result/HTML/doc2.htm.sax result/HTML/doc3.htm.sax
  result/HTML/wired.html.sax: this affects the SAX event strem for
  a few test cases
Daniel
This commit is contained in:
Daniel Veillard
2006-10-17 16:13:27 +00:00
parent 48519092e5
commit c47d263049
5 changed files with 20 additions and 13 deletions

View File

@ -1,3 +1,11 @@
Tue Oct 17 18:12:34 CEST 2006 Daniel Veillard <daniel@veillard.com>
* HTMLparser.c: fixing HTML minimized attribute values to be generated
internally if not present, fixes bug #332124
* result/HTML/doc2.htm.sax result/HTML/doc3.htm.sax
result/HTML/wired.html.sax: this affects the SAX event strem for
a few test cases
Tue Oct 17 17:56:31 CEST 2006 Daniel Veillard <daniel@veillard.com> Tue Oct 17 17:56:31 CEST 2006 Daniel Veillard <daniel@veillard.com>
* HTMLparser.c: fixing HTML entities in attributes parsing bug #362552 * HTMLparser.c: fixing HTML entities in attributes parsing bug #362552

View File

@ -3235,12 +3235,11 @@ htmlParseAttribute(htmlParserCtxtPtr ctxt, xmlChar **value) {
NEXT; NEXT;
SKIP_BLANKS; SKIP_BLANKS;
val = htmlParseAttValue(ctxt); val = htmlParseAttValue(ctxt);
/****** } else if (htmlIsBooleanAttr(name)) {
} else { /*
* TODO : some attribute must have values, some may not * assume a minimized attribute
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) */
ctxt->sax->warning(ctxt->userData, val = xmlStrdup(name);
"No value for attribute %s\n", name); */
} }
*value = val; *value = val;

View File

@ -38,12 +38,12 @@ SAX.startElement(meta, content='MSHTML 5.00.3103.1000', name='GENERATOR')
SAX.endElement(meta) SAX.endElement(meta)
SAX.endElement(head) SAX.endElement(head)
SAX.startElement(frameset, border='false', cols='172,*', frameborder='0', framespacing='0') SAX.startElement(frameset, border='false', cols='172,*', frameborder='0', framespacing='0')
SAX.startElement(frame, marginheight='0', marginwidth='0', name='left', noresize, scrolling='no', src='doc2_files/side.htm', target='rtop') SAX.startElement(frame, marginheight='0', marginwidth='0', name='left', noresize='noresize', scrolling='no', src='doc2_files/side.htm', target='rtop')
SAX.endElement(frame) SAX.endElement(frame)
SAX.startElement(frameset, rows='43,*') SAX.startElement(frameset, rows='43,*')
SAX.startElement(frame, marginheight='0', marginwidth='0', name='rtop', noresize, scrolling='no', src='doc2_files/top.htm', target='rbottom') SAX.startElement(frame, marginheight='0', marginwidth='0', name='rtop', noresize='noresize', scrolling='no', src='doc2_files/top.htm', target='rbottom')
SAX.endElement(frame) SAX.endElement(frame)
SAX.startElement(frame, name='rbottom', noresize, src='doc2_files/contents.htm', target='_top') SAX.startElement(frame, name='rbottom', noresize='noresize', src='doc2_files/contents.htm', target='_top')
SAX.endElement(frame) SAX.endElement(frame)
SAX.endElement(frameset) SAX.endElement(frameset)
SAX.startElement(noframes) SAX.startElement(noframes)

View File

@ -2589,7 +2589,7 @@ SAX.characters(
SAX.endElement(br) SAX.endElement(br)
SAX.characters( SAX.characters(
, 14) , 14)
SAX.endElement(font) SAX.endElement(font)
SAX.startElement(center) SAX.startElement(center)
SAX.startElement(iframe, frameborder='0', height='60', marginheight='0', marginwidth='0', noresize='noresize', scrolling='no', src='doc3_files/ad_iframe.htm', width='468') SAX.startElement(iframe, frameborder='0', height='60', marginheight='0', marginwidth='0', noresize='noresize', scrolling='no', src='doc3_files/ad_iframe.htm', width='468')
SAX.startElement(a, href='http://ads.adflight.com/go_static.asp?asid=7708', target='_top') SAX.startElement(a, href='http://ads.adflight.com/go_static.asp?asid=7708', target='_top')
@ -2754,7 +2754,7 @@ SAX.startElement(noscript)
SAX.startElement(b) SAX.startElement(b)
SAX.startElement(noscript) SAX.startElement(noscript)
SAX.endElement(noscript) SAX.endElement(noscript)
SAX.endElement(b) SAX.endElement(b)
SAX.startElement(a, href='http://www.goto.com/d/search/ssn/?fromGIF=true', target='_blank') SAX.startElement(a, href='http://www.goto.com/d/search/ssn/?fromGIF=true', target='_blank')
SAX.startElement(img, align='bottom', border='0', height='90', ismap='ismap', src='doc3_files/100x90.gif', width='100') SAX.startElement(img, align='bottom', border='0', height='90', ismap='ismap', src='doc3_files/100x90.gif', width='100')
SAX.endElement(img) SAX.endElement(img)

View File

@ -49,7 +49,7 @@ SAX.characters(
SAX.startElement(select, name='state') SAX.startElement(select, name='state')
SAX.characters( SAX.characters(
, 2) , 2)
SAX.startElement(option, value='WA', selected) SAX.startElement(option, value='WA', selected='selected')
SAX.characters(WA SAX.characters(WA
, 4) , 4)
SAX.endElement(option) SAX.endElement(option)
@ -442,7 +442,7 @@ SAX.error: htmlParseEntityRef: expecting ';'
SAX.error: htmlParseEntityRef: expecting ';' SAX.error: htmlParseEntityRef: expecting ';'
SAX.error: htmlParseEntityRef: expecting ';' SAX.error: htmlParseEntityRef: expecting ';'
SAX.error: htmlParseEntityRef: expecting ';' SAX.error: htmlParseEntityRef: expecting ';'
SAX.startElement(option, value='http://search.hotwired.com/search97/s97.vts?Action=FilterSearch&amp;Filter=docs_filter.hts&amp;ResultTemplate=vignette.hts&amp;Collection=vignette&amp;QueryMode=Internet&amp;Query=', selected) SAX.startElement(option, value='http://search.hotwired.com/search97/s97.vts?Action=FilterSearch&amp;Filter=docs_filter.hts&amp;ResultTemplate=vignette.hts&amp;Collection=vignette&amp;QueryMode=Internet&amp;Query=', selected='selected')
SAX.characters(Wired News, 10) SAX.characters(Wired News, 10)
SAX.endElement(option) SAX.endElement(option)
SAX.characters( SAX.characters(