mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Add wp_json_encode(), a wrapper for json_encode() that ensures everything is converted to UTF-8.
Change all core calls from `json_encode()` to `wp_json_encode()`. Fixes #28786. git-svn-id: https://develop.svn.wordpress.org/trunk@30055 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -500,7 +500,7 @@ final class _WP_Editors {
|
||||
);
|
||||
|
||||
if ( ! empty( $mce_external_plugins ) ) {
|
||||
self::$first_init['external_plugins'] = json_encode( $mce_external_plugins );
|
||||
self::$first_init['external_plugins'] = wp_json_encode( $mce_external_plugins );
|
||||
}
|
||||
|
||||
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
@@ -986,7 +986,7 @@ final class _WP_Editors {
|
||||
$mce_translation['_dir'] = 'rtl';
|
||||
}
|
||||
|
||||
return "tinymce.addI18n( '$mce_locale', " . json_encode( $mce_translation ) . ");\n" .
|
||||
return "tinymce.addI18n( '$mce_locale', " . wp_json_encode( $mce_translation ) . ");\n" .
|
||||
"tinymce.ScriptLoader.markDone( '$baseurl/langs/$mce_locale.js' );\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user