Plugins: Remove slashes from search terms and use urldecode() in non-URL contexts.

Fixes #35712.

git-svn-id: https://develop.svn.wordpress.org/trunk@36560 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2016-02-17 20:14:37 +00:00
parent 548a18059c
commit 479596acda
2 changed files with 5 additions and 5 deletions

View File

@@ -268,7 +268,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
}
/**
* @global string $s
* @global string $s URL encoded search term.
*
* @param array $plugin
* @return bool
@@ -277,7 +277,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
global $s;
foreach ( $plugin as $value ) {
if ( is_string( $value ) && false !== stripos( strip_tags( $value ), $s ) ) {
if ( is_string( $value ) && false !== stripos( strip_tags( $value ), urldecode( $s ) ) ) {
return true;
}
}
@@ -316,7 +316,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
global $plugins;
if ( ! empty( $_REQUEST['s'] ) ) {
$s = esc_html( $_REQUEST['s'] );
$s = esc_html( wp_unslash( $_REQUEST['s'] ) );
printf( __( 'No plugins found for “%s”.' ), $s );