diff options
author | Daniel Veillard <veillard@redhat.com> | 2009-10-16 16:47:58 +0200 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2009-10-16 16:47:58 +0200 |
commit | f3c06692e0d200ae0d35b5b3c31de8c56aa99ac6 (patch) | |
tree | f13958751f613542db6c7402234a1b047d787985 /valid.c | |
parent | 729601f15772c19778062b98bd0716d8f5c2af3b (diff) | |
download | libxml2-f3c06692e0d200ae0d35b5b3c31de8c56aa99ac6.tar.gz |
Recognize ID attribute in HTML without DOCTYPE
* valid.c: xmlIsID() was short-circuiting the case where there
was no DTD.
Diffstat (limited to 'valid.c')
-rw-r--r-- | valid.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2679,7 +2679,8 @@ xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) { (!strcmp((char *) attr->ns->prefix, "xml"))) return(1); if (doc == NULL) return(0); - if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) { + if ((doc->intSubset == NULL) && (doc->extSubset == NULL) && + (doc->type != XML_HTML_DOCUMENT_NODE)) { return(0); } else if (doc->type == XML_HTML_DOCUMENT_NODE) { if ((xmlStrEqual(BAD_CAST "id", attr->name)) || |