From 0f76fade7f80b56efb9bb3f2a3aa4aadcc32dbb8 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 | 128 ++++++++ src/HTML5/HTML5DOMDocument81.php | 24 ++ src/HTML5/HTML5DOMDocumentFragment.php | 47 +++ src/HTML5/HTML5DOMDocumentFragment81.php | 12 + src/HTML5/HTML5DOMElement.php | 115 +++++++ src/HTML5/HTML5DOMElement81.php | 36 +++ src/HTML5/Parser/DOMTreeBuilder.php | 72 ++++- src/HTML5/Serializer/OutputRules.php | 8 + src/HTML5/TemplateContents.php | 224 ++++++++++++++ test/HTML5/Html5Test.php | 363 +++++++++++++++++++++++ 11 files changed, 1034 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 fb6e562..93ac475 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 `