Index: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-openverse/functions.php
===================================================================
--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-openverse/functions.php (revision 11060)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-openverse/functions.php (revision 11217)
@@ -86,6 +86,7 @@
wp_add_inline_script(
/* handle */ 'openverse-message',
- /* JS */ 'const openverseUrl = ' . json_encode( get_theme_mod( 'ov_src_url', OPENVERSE_URL ) ) . ";\n" .
- /* JS */ 'const openverseSubpath = ' . json_encode( OPENVERSE_SUBPATH ) . ";\n",
+ /* JS */ 'const openverseUrl = ' . wp_json_encode( get_theme_mod( 'ov_src_url', OPENVERSE_URL ) ) . ";\n" .
+ /* JS */ 'const openverseSubpath = ' . wp_json_encode( OPENVERSE_SUBPATH ) . ";\n" .
+ /* JS */ 'const currentLocale = ' . wp_json_encode( get_locale() ) . ";\n",
/* position */ 'before'
);