File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
tests/phpunit/tests/html-api Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -582,7 +582,7 @@ public function test_complex_javascript_and_json_auto_escaping() {
582582 $ updated_html = $ processor ->get_updated_html ();
583583 $ this ->assertEqualHTML ( $ expected , $ updated_html );
584584
585- // Re-process and verify the JSON is correct.
585+ // Reprocess to ensure JSON survives HTML round-trip:
586586 $ processor = new WP_HTML_Tag_Processor ( $ updated_html );
587587 $ processor ->next_tag ( 'SCRIPT ' );
588588 $ this ->assertSame ( 'importmap ' , $ processor ->get_attribute ( 'type ' ) );
@@ -625,8 +625,8 @@ public function test_json_auto_escaping() {
625625 $ updated_html = $ processor ->get_updated_html ();
626626 $ this ->assertEqualHTML ( $ expected , $ updated_html );
627627
628- // Reprocess to ensure JSON value survives HTML round trip:
629- $ processor = new WP_HTML_Tag_Processor ( $ expected );
628+ // Reprocess to ensure JSON value survives HTML round- trip:
629+ $ processor = new WP_HTML_Tag_Processor ( $ updated_html );
630630 $ processor ->next_tag ( 'SCRIPT ' );
631631 $ decoded_json_from_html = json_decode ( $ processor ->get_modifiable_text (), true );
632632 $ this ->assertSame ( JSON_ERROR_NONE , json_last_error (), 'JSON failed to decode. ' );
You can’t perform that action at this time.
0 commit comments