Plugins: Properly encode query string s parameter in plugin search.

This ensures special characters like `&` are properly encoded when passed as URL parameter.

Props praful2111, audrasjb, costdev.
Fixes #56339.

Built from https://develop.svn.wordpress.org/trunk@53844


git-svn-id: http://core.svn.wordpress.org/trunk@53403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2022-08-05 14:12:11 +00:00
parent 6996204bab
commit efbd56d13b
3 changed files with 4 additions and 4 deletions

View File

@ -2535,7 +2535,7 @@
data = {
_ajax_nonce: wp.updates.ajaxNonce,
s: event.target.value,
s: encodeURIComponent( event.target.value ),
tab: 'search',
type: $( '#typeselector' ).val(),
pagenow: pagenow
@ -2612,7 +2612,7 @@
$pluginSearch.on( 'keyup input', _.debounce( function( event ) {
var data = {
_ajax_nonce: wp.updates.ajaxNonce,
s: event.target.value,
s: encodeURIComponent( event.target.value ),
pagenow: pagenow,
plugin_status: 'all'
},

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-53843';
$wp_version = '6.1-alpha-53844';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.