Skip to content

Commit b0da6ed

Browse files
authored
Be specific for the namespace of the id attribute (php#14060)
1 parent a86e668 commit b0da6ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/dom/html5_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static lexbor_libxml2_bridge_status lexbor_libxml2_bridge_convert(
226226
last_added_attr = lxml_attr;
227227

228228
/* xmlIsID does some other stuff too that is irrelevant here. */
229-
if (local_name_length == 2 && local_name[0] == 'i' && local_name[1] == 'd') {
229+
if (local_name_length == 2 && local_name[0] == 'i' && local_name[1] == 'd' && attr->node.ns == LXB_NS_HTML) {
230230
xmlAddID(NULL, lxml_doc, value, lxml_attr);
231231
}
232232

0 commit comments

Comments
 (0)