Script Loader: Add missing escaping function to `Moment.js` string localization.
This changeset avoids breaking the inline script added for `Moment.js` localization if for some reason `get_user_locale()` doesn't return a simply string. Props swissspidy. Fixes #61341. Built from https://develop.svn.wordpress.org/trunk@58288 git-svn-id: http://core.svn.wordpress.org/trunk@57748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6c8e2bcb90
commit
e9b86ce6d0
|
@ -144,7 +144,7 @@ function wp_default_packages_vendor( $scripts ) {
|
||||||
'moment',
|
'moment',
|
||||||
sprintf(
|
sprintf(
|
||||||
"moment.updateLocale( '%s', %s );",
|
"moment.updateLocale( '%s', %s );",
|
||||||
get_user_locale(),
|
esc_js( get_user_locale() ),
|
||||||
wp_json_encode(
|
wp_json_encode(
|
||||||
array(
|
array(
|
||||||
'months' => array_values( $wp_locale->month ),
|
'months' => array_values( $wp_locale->month ),
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.6-alpha-58287';
|
$wp_version = '6.6-alpha-58288';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue