Plugins: Remove slashes from search terms and use `urldecode()` in non-URL contexts.
Fixes #35712. Built from https://develop.svn.wordpress.org/trunk@36560 git-svn-id: http://core.svn.wordpress.org/trunk@36527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
10234c1907
commit
bffdae7b1d
|
@ -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 );
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ $pagenum = $wp_list_table->get_pagenum();
|
|||
$action = $wp_list_table->current_action();
|
||||
|
||||
$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
|
||||
$s = isset($_REQUEST['s']) ? urlencode($_REQUEST['s']) : '';
|
||||
$s = isset($_REQUEST['s']) ? urlencode( wp_unslash( $_REQUEST['s'] ) ) : '';
|
||||
|
||||
// Clean up request URI from temporary args for screen options/paging uri's to work as expected.
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']);
|
||||
|
@ -486,7 +486,7 @@ if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plu
|
|||
|
||||
if ( strlen( $s ) ) {
|
||||
/* translators: %s: search keywords */
|
||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) );
|
||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( urldecode( $s ) ) );
|
||||
}
|
||||
?>
|
||||
</h1>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-36559';
|
||||
$wp_version = '4.5-alpha-36560';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue