1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-14 19:24:06 +03:00

Recognize ID attribute in HTML without DOCTYPE

* valid.c: xmlIsID() was short-circuiting the case where there
  was no DTD.
This commit is contained in:
Daniel Veillard 2009-10-16 16:47:58 +02:00
parent 729601f157
commit f3c06692e0

View File

@ -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)) ||