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:
parent
729601f157
commit
f3c06692e0
3
valid.c
3
valid.c
@ -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)) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user