Commit 56e5a80c442 for php.net

commit 56e5a80c442b29711174d9b3f39ad97deda6b878
Author: Alexander Borisov <lex.borisov@gmail.com>
Date:   Mon Jan 26 19:19:45 2026 +0100

    Fix GH-21041: Dom\HTMLDocument corrupts closing tags within scripts

diff --git a/NEWS b/NEWS
index e229b4aaec3..f863e4d3cae 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,10 @@ PHP                                                                        NEWS
 - Date:
   . Update timelib to 2022.16. (Derick)

+- DOM:
+  . Fixed GH-21041 (Dom\HTMLDocument corrupts closing tags within scripts).
+    (lexborisov)
+
 - MbString:
   . Fixed bug GH-20833 (mb_str_pad() divide by zero if padding string is
     invalid in the encoding). (ndossche)
diff --git a/ext/dom/lexbor/lexbor/html/tokenizer/state_script.c b/ext/dom/lexbor/lexbor/html/tokenizer/state_script.c
index 188cf08f9f6..4d56d18f7f3 100644
--- a/ext/dom/lexbor/lexbor/html/tokenizer/state_script.c
+++ b/ext/dom/lexbor/lexbor/html/tokenizer/state_script.c
@@ -364,6 +364,7 @@ lxb_html_tokenizer_state_script_data_end_tag_name(lxb_html_tokenizer_t *tkz,
                 if (lexbor_str_res_alpha_character[*data]
                     == LEXBOR_STR_RES_SLIP)
                 {
+                    lxb_html_tokenizer_state_append_data_m(tkz, data);
                     goto anything_else;
                 }