From b0da6ed6eeec6a659c16369bc33386cc120af732 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 28 Apr 2024 11:40:54 +0200 Subject: [PATCH] Be specific for the namespace of the id attribute (#14060) --- ext/dom/html5_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/dom/html5_parser.c b/ext/dom/html5_parser.c index 87e62d6fd88..13fbbe58149 100644 --- a/ext/dom/html5_parser.c +++ b/ext/dom/html5_parser.c @@ -226,7 +226,7 @@ static lexbor_libxml2_bridge_status lexbor_libxml2_bridge_convert( last_added_attr = lxml_attr; /* xmlIsID does some other stuff too that is irrelevant here. */ - if (local_name_length == 2 && local_name[0] == 'i' && local_name[1] == 'd') { + if (local_name_length == 2 && local_name[0] == 'i' && local_name[1] == 'd' && attr->node.ns == LXB_NS_HTML) { xmlAddID(NULL, lxml_doc, value, lxml_attr); }