[libxml2] Recognize ID attribute in HTML without DOCTYPE
- From: Daniel Veillard <veillard src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libxml2] Recognize ID attribute in HTML without DOCTYPE
- Date: Fri, 16 Oct 2009 14:58:46 +0000 (UTC)
commit f3c06692e0d200ae0d35b5b3c31de8c56aa99ac6
Author: Daniel Veillard <veillard redhat com>
Date: Fri Oct 16 16:47:58 2009 +0200
Recognize ID attribute in HTML without DOCTYPE
* valid.c: xmlIsID() was short-circuiting the case where there
was no DTD.
valid.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/valid.c b/valid.c
index 37b55d0..2cb32f3 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)) ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]