Skip to content

Commit

Permalink
Fix expected and add missing commas
Browse files Browse the repository at this point in the history
  • Loading branch information
DAreRodz committed Jul 21, 2023
1 parent c24f7ee commit 9176b2f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ public function test_store_should_also_escape_tags_and_amps() {
array(
'state' => array(
'amps' => 'http://site.test/?foo=1&baz=2&bar=3',
'tags' => 'Do not do this: <!-- <script>'
)
'tags' => 'Do not do this: <!-- <script>',
),
)
);
ob_start();
WP_Interactivity_Store::render();
$rendered = ob_get_clean();
$this->assertSame(
'<script id="wp-interactivity-store-data" type="application/json">{"state":{"amps":"http:\/\/site.test\/?foo=1\u0026baz=2\u0026bar=3","content":"Do not do this: \u003C!-- \u003Cscript\u003E"}}</script>',
'<script id="wp-interactivity-store-data" type="application/json">{"state":{"amps":"http:\/\/site.test\/?foo=1\u0026baz=2\u0026bar=3","tags":"Do not do this: \u003C!-- \u003Cscript\u003E"}}</script>',
$rendered
);
}
Expand Down

0 comments on commit 9176b2f

Please sign in to comment.