From 884259a7bcce9f5139069e52ff4da1d02ccf773d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ey=C3=BCp=20Can=20Akman?= Date: Sun, 15 Mar 2026 23:54:34 +0300 Subject: [PATCH] Fix template contents participating in the DOM tree --- README.md | 15 +- src/HTML5/HTML5DOMDocument.php | 136 +++++++++ src/HTML5/HTML5DOMDocument81.php | 24 ++ src/HTML5/HTML5DOMDocumentFragment.php | 44 +++ src/HTML5/HTML5DOMDocumentFragment81.php | 12 + src/HTML5/HTML5DOMElement.php | 115 +++++++ src/HTML5/HTML5DOMElement81.php | 36 +++ src/HTML5/Parser/DOMTreeBuilder.php | 70 ++++- src/HTML5/Serializer/OutputRules.php | 8 + src/HTML5/TemplateContents.php | 206 +++++++++++++ test/HTML5/Html5Test.php | 363 +++++++++++++++++++++++ 11 files changed, 1019 insertions(+), 10 deletions(-) create mode 100644 src/HTML5/HTML5DOMDocument.php create mode 100644 src/HTML5/HTML5DOMDocument81.php create mode 100644 src/HTML5/HTML5DOMDocumentFragment.php create mode 100644 src/HTML5/HTML5DOMDocumentFragment81.php create mode 100644 src/HTML5/HTML5DOMElement.php create mode 100644 src/HTML5/HTML5DOMElement81.php create mode 100644 src/HTML5/TemplateContents.php diff --git a/README.md b/README.md index 8487811..5e8b995 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,20 @@ The following options are supported: assigning the HTML5 namespace to the DOM document. This is for non-namespace aware DOM tools. * `target_document` (\DOMDocument): A DOM document that will be used as the - destination for the parsed nodes. + destination for the parsed nodes. When parsing `