Plugins: Correctly display spaces in installed plugins search results.

This changeset improves searched terms URL decoding in installed plugins search results.

Follow-up to [53844].

Props 254volkan, dilipbheda, audrasjb, adhun, syamraj24.
Fixes #57174.


git-svn-id: https://develop.svn.wordpress.org/trunk@54904 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras 2022-11-29 23:44:27 +00:00
parent ef0c1d1dd2
commit 0fa641caca
2 changed files with 2 additions and 2 deletions

View File

@ -2654,7 +2654,7 @@
sprintf(
/* translators: %s: Search query. */
__( 'Search results for: %s' ),
'<strong>' + _.escape( data.s ) + '</strong>'
'<strong>' + _.escape( decodeURIComponent( data.s ) ) + '</strong>'
) ),
$oldSubTitle = $( '.wrap .subtitle' );

View File

@ -403,7 +403,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
global $plugins;
if ( ! empty( $_REQUEST['s'] ) ) {
$s = esc_html( wp_unslash( $_REQUEST['s'] ) );
$s = esc_html( urldecode( wp_unslash( $_REQUEST['s'] ) ) );
/* translators: %s: Plugin search term. */
printf( __( 'No plugins found for: %s.' ), '<strong>' . $s . '</strong>' );