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.


git-svn-id: https://develop.svn.wordpress.org/trunk@53844 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras 2022-08-05 14:10:03 +00:00
parent 5abf5f6b61
commit 39ade7e466

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'
},