Changeset 60681 for trunk/src/wp-includes/class-wp-customize-widgets.php
- Timestamp:
- 08/27/2025 10:32:57 AM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-widgets.php
r60290 r60681 833 833 'customize-widgets', 834 834 'data', 835 sprintf( 'var _wpCustomizeWidgetsSettings = %s;', wp_json_encode( $settings ) )835 sprintf( 'var _wpCustomizeWidgetsSettings = %s;', wp_json_encode( $settings, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ) 836 836 ); 837 837 … … 860 860 wp.customizeWidgets.initialize( "widgets-customizer", %s ); 861 861 } );', 862 wp_json_encode( $editor_settings )862 wp_json_encode( $editor_settings, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) 863 863 ) 864 864 ); … … 867 867 wp_add_inline_script( 868 868 'wp-blocks', 869 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'869 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings(), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ');' 870 870 ); 871 871 … … 881 881 ); 882 882 } 883 $script = sprintf( 'for ( const source of %s ) { wp.blocks.registerBlockBindingsSource( source ); }', wp_json_encode( $filtered_sources ) );883 $script = sprintf( 'for ( const source of %s ) { wp.blocks.registerBlockBindingsSource( source ); }', wp_json_encode( $filtered_sources, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ); 884 884 wp_add_inline_script( 885 885 'wp-blocks', … … 890 890 wp_add_inline_script( 891 891 'wp-blocks', 892 sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $block_editor_context ) ) ),892 sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $block_editor_context ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ), 893 893 'after' 894 894 ); … … 1335 1335 } 1336 1336 wp_print_inline_script_tag( 1337 sprintf( 'var _wpWidgetCustomizerPreviewSettings = %s;', wp_json_encode( $settings ) )1337 sprintf( 'var _wpWidgetCustomizerPreviewSettings = %s;', wp_json_encode( $settings, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ) 1338 1338 ); 1339 1339 }
Note: See TracChangeset
for help on using the changeset viewer.