From d60035dfde8382769a6458376be1b78faf396e9e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 21 Dec 2023 17:37:05 +0100 Subject: [PATCH] Fix GH-12980: tidynode.props.attribute is missing "Boolean Attributes" and empty attributes --- ext/tidy/tests/gh12980.phpt | 34 ++++++++++++++++++++++++++++++++++ ext/tidy/tidy.c | 8 ++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 ext/tidy/tests/gh12980.phpt diff --git a/ext/tidy/tests/gh12980.phpt b/ext/tidy/tests/gh12980.phpt new file mode 100644 index 0000000000000..042701388a4e5 --- /dev/null +++ b/ext/tidy/tests/gh12980.phpt @@ -0,0 +1,34 @@ +--TEST-- +GH-12980 (tidynode.props.attribute is missing "Boolean Attributes" and empty attributes) +--EXTENSIONS-- +tidy +--FILE-- +'; + +$tidy = new tidy(); +$tidy->ParseString($html); +echo tidy_get_output($tidy), "\n"; + +var_dump($tidy->root()->child[1]->attribute); + +?> +--EXPECT-- + + +
+