wip
This commit is contained in:
@@ -41,14 +41,14 @@ wp_add_inline_script(
|
||||
'wp.domReady( function() {
|
||||
wp.editWidgets.initialize( "widgets-editor", %s );
|
||||
} );',
|
||||
wp_json_encode( $editor_settings )
|
||||
wp_json_encode( $editor_settings, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
|
||||
)
|
||||
);
|
||||
|
||||
// Preload server-registered block schemas.
|
||||
wp_add_inline_script(
|
||||
'wp-blocks',
|
||||
'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'
|
||||
'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings(), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ');'
|
||||
);
|
||||
|
||||
// Preload server-registered block bindings sources.
|
||||
@@ -62,7 +62,7 @@ if ( ! empty( $registered_sources ) ) {
|
||||
'usesContext' => $source->uses_context,
|
||||
);
|
||||
}
|
||||
$script = sprintf( 'for ( const source of %s ) { wp.blocks.registerBlockBindingsSource( source ); }', wp_json_encode( $filtered_sources ) );
|
||||
$script = sprintf( 'for ( const source of %s ) { wp.blocks.registerBlockBindingsSource( source ); }', wp_json_encode( $filtered_sources, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) );
|
||||
wp_add_inline_script(
|
||||
'wp-blocks',
|
||||
$script
|
||||
@@ -71,7 +71,7 @@ if ( ! empty( $registered_sources ) ) {
|
||||
|
||||
wp_add_inline_script(
|
||||
'wp-blocks',
|
||||
sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $block_editor_context ) ) ),
|
||||
sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $block_editor_context ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ),
|
||||
'after'
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user