[php-src] PR #21868: ext/dom: Fix Dom\Notation nodes missing tree connection
| From: | jordikroon | Date: | Fri, 24 Apr 2026 18:31:29 +0000 |
| Subject: | [php-src] PR #21868: ext/dom: Fix Dom\Notation nodes missing tree connection | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-35889@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/21868
Author: jordikroon
Fixes an existing TODO by @ndossche.
Notation nodes returned from
$doctype->notations were not linked to their owning
document or parent DocumentType. This caused several incorrect behaviour; including:
- ownerDocument was missing
- parentNode was NULL
- isConnected returned false
- baseURI fell back to "about:blank"
- textContent returned an empty string instead of NULL
The last point is a violation of the DOM specification. Since Notation is not an
Element, CharacterData, Attr, or
DocumentFragment, its textContent must return NULL.
Spec reference: https://dom.spec.whatwg.org/#dom-node-textcontent