Commit 0d663830ef for wordpress.org
commit 0d663830ef201fb26d9adbca44a3595a8b80e7fd
Author: johnbillion <johnbillion@git.wordpress.org>
Date: Wed Nov 18 13:23:50 2026 +0000
Interactivity API: Escape the store namespace in `wp_interactivity_data_wp_context()`.
Props jrf, gziolo, luisherranz, jonsurrell, lancewillett.
Built from https://develop.svn.wordpress.org/trunk@65580
git-svn-id: http://core.svn.wordpress.org/trunk@64653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/interactivity-api/interactivity-api.php b/wp-includes/interactivity-api/interactivity-api.php
index 81c6362b94..b08e141916 100644
--- a/wp-includes/interactivity-api/interactivity-api.php
+++ b/wp-includes/interactivity-api/interactivity-api.php
@@ -103,7 +103,7 @@ function wp_interactivity_config( string $store_namespace, array $config = array
*/
function wp_interactivity_data_wp_context( array $context, string $store_namespace = '' ): string {
return 'data-wp-context=\'' .
- ( $store_namespace ? $store_namespace . '::' : '' ) .
+ ( $store_namespace ? esc_attr( $store_namespace ) . '::' : '' ) .
( empty( $context ) ? '{}' : wp_json_encode( $context, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) ) .
'\'';
}
diff --git a/wp-includes/version.php b/wp-includes/version.php
index cd4fe28e87..28917730a9 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-RC1-65579';
+$wp_version = '7.2-RC1-65580';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.