Changeset 60681 for trunk/src/wp-admin/edit-form-blocks.php
- Timestamp:
- 08/27/2025 10:32:57 AM (8 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/edit-form-blocks.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-blocks.php
r59958 r60681 116 116 wp_add_inline_script( 117 117 'wp-blocks', 118 sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $post ) ) ),118 sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $post ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ), 119 119 'after' 120 120 ); … … 145 145 wp_add_inline_script( 146 146 'wp-blocks', 147 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'147 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings(), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ');' 148 148 ); 149 149 … … 159 159 ); 160 160 } 161 $script = sprintf( 'for ( const source of %s ) { wp.blocks.registerBlockBindingsSource( source ); }', wp_json_encode( $filtered_sources ) );161 $script = sprintf( 'for ( const source of %s ) { wp.blocks.registerBlockBindingsSource( source ); }', wp_json_encode( $filtered_sources, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ); 162 162 wp_add_inline_script( 163 163 'wp-blocks', … … 179 179 wp_add_inline_script( 180 180 'wp-editor', 181 sprintf( 'var _wpMetaBoxUrl = %s;', wp_json_encode( $meta_box_url ) ),181 sprintf( 'var _wpMetaBoxUrl = %s;', wp_json_encode( $meta_box_url, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ), 182 182 'before' 183 183 ); … … 365 365 $post->post_type, 366 366 $post->ID, 367 wp_json_encode( $editor_settings ),368 wp_json_encode( $initial_edits )367 wp_json_encode( $editor_settings, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), 368 wp_json_encode( $initial_edits, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) 369 369 ); 370 370 wp_add_inline_script( 'wp-edit-post', $script );
Note: See TracChangeset
for help on using the changeset viewer.