Skip to content

Commit d9c046d

Browse files
committed
Improve closing script tag test
1 parent be298c2 commit d9c046d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/phpunit/tests/blocks/editor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ public function test_ensure_preload_data_script_tag_closes() {
738738
array(
739739
'methods' => 'GET',
740740
'callback' => function () {
741-
return '<!-- unclosed comment and a script tag <script></script>';
741+
return '<!-- unclosed comment and a script tag <SCRIPT></SCRIPT><script></script>';
742742
},
743743
'permission_callback' => '__return_true',
744744
)
@@ -761,7 +761,7 @@ public function test_ensure_preload_data_script_tag_closes() {
761761
$expected = <<<HTML
762762
<script src="{$baseurl}/wp-includes/js/dist/api-fetch.min.js?ver=test" id="wp-api-fetch-js"></script>
763763
<script id="wp-api-fetch-js-after">
764-
wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( {"/test/v0/test-62797":{"body":["\\u003C!-- unclosed comment and a script tag \\u003Cscript\\u003E\\u003C/script\\u003E"],"headers":{"Allow":"GET"}}} ) );
764+
wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( {"/test/v0/test-62797":{"body":["<!-- unclosed comment and a script tag <\u0053CRIPT></\u0053CRIPT><\u0073cript></\u0073cript>"],"headers":{"Allow":"GET"}}} ) );
765765
</script>
766766
767767
HTML;

0 commit comments

Comments
 (0)