diff --git a/README.md b/README.md index 81236dd..9b66a27 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Contributors: ACLabs Tags: search, google, gcse, programmable search, cse Requires at least: 6.4 Tested up to: 7.0 -Stable tag: 1.2.3 +Stable tag: 1.2.5 Requires PHP: 8.2 License: AGPL v3 or later License URI: https://www.gnu.org/licenses/agpl-3.0.html diff --git a/gpse/includes/class-wp-gpse-blocks.php b/gpse/includes/class-wp-gpse-blocks.php index c676dd2..6ed33d7 100644 --- a/gpse/includes/class-wp-gpse-blocks.php +++ b/gpse/includes/class-wp-gpse-blocks.php @@ -30,11 +30,8 @@ public function init() { /** * Register Gutenberg blocks. * - * Registers two blocks using Block API v3: - * - gpse/search-form: Google CSE search input box - * - gpse/search-results: Google CSE search results display - * - * Both blocks use server-side rendering with dynamic callbacks. + * Registers the gpse/search-results block using Block API v3 with + * server-side rendering via dynamic callback. * * @since 1.1.0 * @return void diff --git a/gpse/includes/class-wp-gpse-frontend.php b/gpse/includes/class-wp-gpse-frontend.php index c0a8246..7aca775 100644 --- a/gpse/includes/class-wp-gpse-frontend.php +++ b/gpse/includes/class-wp-gpse-frontend.php @@ -82,7 +82,7 @@ public function enqueue_google_script() { if ( ! empty( $cx_id ) ) { wp_enqueue_script( 'google-cse', - 'https://cse.google.com/cse.js?cx=' . esc_attr( $cx_id ), + 'https://cse.google.com/cse.js?cx=' . rawurlencode( $cx_id ), array(), null, array( 'strategy' => 'defer', 'in_footer' => true ) diff --git a/gpse/readme.txt b/gpse/readme.txt index d5c2b19..49fa439 100644 --- a/gpse/readme.txt +++ b/gpse/readme.txt @@ -57,6 +57,12 @@ By using this plugin you agree to be bound by Google's Terms of Service and ackn == Changelog == += 1.2.6 = +* Confirmed compatibility with WordPress 7.0. +* Fixed URL encoding of Google CSE CX ID (rawurlencode instead of esc_attr). +* Removed spurious version query string from Google CSE script URL. +* Added `role: content` to block.json for correct editability in WordPress 7.0 contentOnly patterns. + = 1.2.5 = * Restrict Google CSE script, stylesheet, and init script to the configured results page only. * Add third-party service disclosure for Google Programmable Search Engine. diff --git a/gpse/src/search-results/block.json b/gpse/src/search-results/block.json index 5647b87..8a3db67 100644 --- a/gpse/src/search-results/block.json +++ b/gpse/src/search-results/block.json @@ -7,6 +7,7 @@ "category": "widgets", "icon": "welcome-widgets-menus", "description": "Google Programmable Search Engine results list.", + "role": "content", "supports": { "html": false, "align": true