aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--HTMLparser.c5
-rw-r--r--SAX2.c38
-rw-r--r--result/HTML/doc2.htm.sax6
-rw-r--r--result/HTML/doc3.htm.sax4
-rw-r--r--result/HTML/wired.html.sax4
5 files changed, 30 insertions, 27 deletions
diff --git a/HTMLparser.c b/HTMLparser.c
index a3fbb7f2..3e2467c5 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -3426,11 +3426,6 @@ htmlParseAttribute(htmlParserCtxtPtr ctxt, xmlChar **value) {
NEXT;
SKIP_BLANKS;
val = htmlParseAttValue(ctxt);
- } else if (htmlIsBooleanAttr(name)) {
- /*
- * assume a minimized attribute
- */
- val = xmlStrdup(name);
}
*value = val;
diff --git a/SAX2.c b/SAX2.c
index 1ed148fb..04c0e304 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -1105,24 +1105,32 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
return;
}
+#ifdef LIBXML_HTML_ENABLED
+ if ((ctxt->html) &&
+ (value == NULL) && (htmlIsBooleanAttr(fullname))) {
+ nval = value = xmlStrdup(fullname);
+ } else
+#endif
+ {
#ifdef LIBXML_VALID_ENABLED
- /*
- * Do the last stage of the attribute normalization
- * Needed for HTML too:
- * http://www.w3.org/TR/html4/types.html#h-6.2
- */
- ctxt->vctxt.valid = 1;
- nval = xmlValidCtxtNormalizeAttributeValue(&ctxt->vctxt,
- ctxt->myDoc, ctxt->node,
- fullname, value);
- if (ctxt->vctxt.valid != 1) {
- ctxt->valid = 0;
- }
- if (nval != NULL)
- value = nval;
+ /*
+ * Do the last stage of the attribute normalization
+ * Needed for HTML too:
+ * http://www.w3.org/TR/html4/types.html#h-6.2
+ */
+ ctxt->vctxt.valid = 1;
+ nval = xmlValidCtxtNormalizeAttributeValue(&ctxt->vctxt,
+ ctxt->myDoc, ctxt->node,
+ fullname, value);
+ if (ctxt->vctxt.valid != 1) {
+ ctxt->valid = 0;
+ }
+ if (nval != NULL)
+ value = nval;
#else
- nval = NULL;
+ nval = NULL;
#endif /* LIBXML_VALID_ENABLED */
+ }
/*
* Check whether it's a namespace definition
diff --git a/result/HTML/doc2.htm.sax b/result/HTML/doc2.htm.sax
index f216ce35..7cbbc510 100644
--- a/result/HTML/doc2.htm.sax
+++ b/result/HTML/doc2.htm.sax
@@ -38,12 +38,12 @@ SAX.startElement(meta, content='MSHTML 5.00.3103.1000', name='GENERATOR')
SAX.endElement(meta)
SAX.endElement(head)
SAX.startElement(frameset, border='false', cols='172,*', frameborder='0', framespacing='0')
-SAX.startElement(frame, marginheight='0', marginwidth='0', name='left', noresize='noresize', scrolling='no', src='doc2_files/side.htm', target='rtop')
+SAX.startElement(frame, marginheight='0', marginwidth='0', name='left', noresize, scrolling='no', src='doc2_files/side.htm', target='rtop')
SAX.endElement(frame)
SAX.startElement(frameset, rows='43,*')
-SAX.startElement(frame, marginheight='0', marginwidth='0', name='rtop', noresize='noresize', scrolling='no', src='doc2_files/top.htm', target='rbottom')
+SAX.startElement(frame, marginheight='0', marginwidth='0', name='rtop', noresize, scrolling='no', src='doc2_files/top.htm', target='rbottom')
SAX.endElement(frame)
-SAX.startElement(frame, name='rbottom', noresize='noresize', src='doc2_files/contents.htm', target='_top')
+SAX.startElement(frame, name='rbottom', noresize, src='doc2_files/contents.htm', target='_top')
SAX.endElement(frame)
SAX.endElement(frameset)
SAX.startElement(noframes)
diff --git a/result/HTML/doc3.htm.sax b/result/HTML/doc3.htm.sax
index 3f32c4ab..13477f1f 100644
--- a/result/HTML/doc3.htm.sax
+++ b/result/HTML/doc3.htm.sax
@@ -2566,7 +2566,7 @@ SAX.characters(
, 14)
SAX.endElement(font)
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, 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.error: htmlParseEntityRef: expecting ';'
SAX.error: htmlParseEntityRef: expecting ';'
@@ -2713,7 +2713,7 @@ SAX.startElement(noscript)
SAX.endElement(noscript)
SAX.endElement(b)
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, src='doc3_files/100x90.gif', width='100')
SAX.endElement(img)
SAX.endElement(a)
SAX.startElement(b)
diff --git a/result/HTML/wired.html.sax b/result/HTML/wired.html.sax
index 9d3e5f45..3860c76f 100644
--- a/result/HTML/wired.html.sax
+++ b/result/HTML/wired.html.sax
@@ -49,7 +49,7 @@ SAX.characters(
SAX.startElement(select, name='state')
SAX.characters(
, 2)
-SAX.startElement(option, value='WA', selected='selected')
+SAX.startElement(option, value='WA', selected)
SAX.characters(WA
, 4)
SAX.endElement(option)
@@ -442,7 +442,7 @@ 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&Filter=docs_filter.hts&ResultTemplate=vignette.hts&Collection=vignette&QueryMode=Internet&Query=', selected='selected')
+SAX.startElement(option, value='http://search.hotwired.com/search97/s97.vts?Action=FilterSearch&Filter=docs_filter.hts&ResultTemplate=vignette.hts&Collection=vignette&QueryMode=Internet&Query=', selected)
SAX.characters(Wired News, 10)
SAX.endElement(option)
SAX.characters(