From f3c06692e0d200ae0d35b5b3c31de8c56aa99ac6 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Fri, 16 Oct 2009 16:47:58 +0200 Subject: Recognize ID attribute in HTML without DOCTYPE * valid.c: xmlIsID() was short-circuiting the case where there was no DTD. --- valid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'valid.c') diff --git a/valid.c b/valid.c index 37b55d04..2cb32f32 100644 --- a/valid.c +++ b/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)) || -- cgit v1.2.1