Add `wp_json_encode()` as an escaping function when setting the `WP_BLOCK_THEME_ACTIVATE_NONCE` global on the block theme preview screen. This account for custom nonce implementations making use of special characters that require escaping in JavaScript strings. Props antonvlasenko, ramonopoly. Fixes #58712. Built from https://develop.svn.wordpress.org/trunk@56218 git-svn-id: http://core.svn.wordpress.org/trunk@55730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2.5 KiB
2.5 KiB