wordpress-develop/tests/phpunit/tests/blocks
Jonathan Desrosiers 44180691e6 Editor: Ensure block attribute serialization in PHP matches the JavaScript equivalent.
The `serializeAttributes()` function in JavaScript uses `JSON.stringify`, which does not encode slashes and unicode characters by default. This resulted in the PHP serialization through `json_encode()` producing different results.

This also switches from `json_encode()` to `wp_json_encode()` to prevent failures when any non UTF-8 characters are included.

Props kevinfodness, SergeyBiryukov, timothyblynjacobs.
Fixes #53936.

git-svn-id: https://develop.svn.wordpress.org/trunk@51674 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 19:09:16 +00:00
..
context.php Coding Standards: Use static closures when not using $this. 2021-08-26 12:57:08 +00:00
editor.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
register.php Coding Standards: Use static closures when not using $this. 2021-08-26 12:57:08 +00:00
render.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
renderReusable.php Tests: Rename classes in phpunit/tests/blocks/ per the naming conventions. 2021-07-26 18:45:48 +00:00
serialize.php Editor: Ensure block attribute serialization in PHP matches the JavaScript equivalent. 2021-08-26 19:09:16 +00:00
supportedStyles.php Coding Standards: Use static closures when not using $this. 2021-08-26 12:57:08 +00:00
wpBlock.php Coding Standards: Use static closures when not using $this. 2021-08-26 12:57:08 +00:00
wpBlockList.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
wpBlockParser.php Tests: Rename classes in phpunit/tests/blocks/ per the naming conventions. 2021-07-26 18:45:48 +00:00
wpBlockType.php Tests: Rename classes in phpunit/tests/blocks/ per the naming conventions. 2021-07-26 18:45:48 +00:00
wpBlockTypeRegistry.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00