diff options
author | Mike Hommey <glandium@debian.org> | 2010-03-18 07:40:32 +0100 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2010-03-18 07:40:32 +0100 |
commit | eb5d521a2df72fa829a7f8196b957c696e7ccc58 (patch) | |
tree | 224599e18a48f87e82aa8a32456563277c68ae58 /SAX2.c | |
parent | 8a10e02b2f4971d3fdacab7dc7baecced34056fb (diff) | |
download | libxml2-eb5d521a2df72fa829a7f8196b957c696e7ccc58.tar.gz |
Import upstream version 2.7.7upstream/2.7.7.dfsg
Diffstat (limited to 'SAX2.c')
-rw-r--r-- | SAX2.c | 39 |
1 files changed, 24 insertions, 15 deletions
@@ -1105,24 +1105,33 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname, return; } +#ifdef LIBXML_HTML_ENABLED + if ((ctxt->html) && + (value == NULL) && (htmlIsBooleanAttr(fullname))) { + nval = xmlStrdup(fullname); + value = (const xmlChar *) nval; + } 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 |