[php-src] PR #23598: dom: register unprefixed id attributes from foreign content in HTML
| From: | iliaal | Date: | Sun, 06 Sep 2026 15:07:46 +0000 |
| Subject: | [php-src] PR #23598: dom: register unprefixed id attributes from foreign content in HTML | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38348@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23598
Author: iliaal
The HTML5 parser bridge only marked an
id attribute as XML_ATTRIBUTE_ID
when the attribute's lexbor namespace was LXB_NS_HTML, so ids on SVG and MathML
elements never reached Dom\HTMLDocument::getElementById().
The condition the bridge wants is that the attribute is unprefixed, which
lxml_attr->ns already records: the struct is memset to zero and ns is
assigned only in the xmlns, xlink and xml branches above.
Testing lxml_attr->ns == NULL covers every element namespace instead of an enumerated subset, and
the test pins that a namespaced xml:id is still not registered.