From c98f64d7557869506e09f1d0bc2bccfe2d919008 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Fri, 2 Aug 2024 14:06:59 +0200 Subject: [PATCH 1/6] Add test case for infinite loop in skip_script_data --- .../phpunit/tests/html-api/wpHtmlTagProcessor.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php index fceaaddb04af6..7afb4aa7e01c3 100644 --- a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php +++ b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php @@ -2875,4 +2875,18 @@ public function insert_after( $new_html ) { 'Should have properly applied the update from in front of the cursor.' ); } + + /** + * Test an infinite loop bugfix in script tag processing. + * + * @small + * + * @ticket TBD + */ + public function test_script_tag_processing_no_infinite_loop() { + $processor = new WP_HTML_Tag_Processor( '