From 0b04061e71070eeb61cc17f46fc85b17f8d71b01 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 17 Jan 2025 19:43:06 +0100 Subject: [PATCH] NEWS for GH-17485 Fixes GH-17485. --- NEWS | 2 ++ ext/dom/tests/modern/html/parser/gh17485.phpt | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 ext/dom/tests/modern/html/parser/gh17485.phpt diff --git a/NEWS b/NEWS index 3f18c810c79..ec26370ab15 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ PHP NEWS . Fixed bug GH-17481 (UTF-8 corruption in \Dom\HTMLDocument). (nielsdos) . Fixed bug GH-17500 (Segfault with requesting nodeName on nameless doctype). (nielsdos) + . Fixed bug GH-17485 (upstream fix, Self-closing tag on void elements + shouldn't be a parse error/warning in \Dom\HTMLDocument). (lexborisov) - Enchant: . Fix crashes in enchant when passing null bytes. (nielsdos) diff --git a/ext/dom/tests/modern/html/parser/gh17485.phpt b/ext/dom/tests/modern/html/parser/gh17485.phpt new file mode 100644 index 00000000000..3f2c6245113 --- /dev/null +++ b/ext/dom/tests/modern/html/parser/gh17485.phpt @@ -0,0 +1,13 @@ +--TEST-- +GH-17485 (Self-closing tag on void elements shouldn't be a parse error/warning in \Dom\HTMLDocument) +--EXTENSIONS-- +dom +--FILE-- +\n
\n"; +$Document = \Dom\HTMLDocument::createFromString( $Data ); +echo $Document->saveHTML(); +?> +--EXPECT-- +
+