1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00

fix HTML attribute ID checking for input element. Maintain current

* valid.c: fix HTML attribute ID checking for input element.
  Maintain current attribute "name" behavior for now.
This commit is contained in:
Rob Richards 2006-03-03 16:44:37 +00:00
parent 30f874d7e6
commit 04bffc028d
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Fri Mar 3 17:44:10 CET 2006 Rob Richards <rrichards@ctindustries.net>
* valid.c: fix HTML attribute ID checking for input element.
Maintain current attribute "name" behavior for now.
Thu Mar 2 18:59:50 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
* tree.c: Bundled lookup of attr-nodes and retrieving their

View File

@ -2712,9 +2712,9 @@ xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) {
return(0);
} else if (doc->type == XML_HTML_DOCUMENT_NODE) {
if (((xmlStrEqual(BAD_CAST "id", attr->name)) ||
(xmlStrEqual(BAD_CAST "name", attr->name))) &&
((elem != NULL) && (!xmlStrEqual(elem->name, BAD_CAST "input"))))
if ((xmlStrEqual(BAD_CAST "id", attr->name)) ||
((xmlStrEqual(BAD_CAST "name", attr->name)) &&
((elem == NULL) || (!xmlStrEqual(elem->name, BAD_CAST "input")))))
return(1);
return(0);
} else if (elem == NULL) {