Consistently trim and unslash search queries for the users list tables.
props aubreypwd. fixes #26115. Built from https://develop.svn.wordpress.org/trunk@27077 git-svn-id: http://core.svn.wordpress.org/trunk@26950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fb3985663a
commit
39e32ed1eb
|
@ -16,7 +16,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
|||
function prepare_items() {
|
||||
global $usersearch, $role, $wpdb, $mode;
|
||||
|
||||
$usersearch = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
|
||||
$usersearch = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : '';
|
||||
|
||||
$users_per_page = $this->get_items_per_page( 'users_network_per_page' );
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
|||
function prepare_items() {
|
||||
global $role, $usersearch;
|
||||
|
||||
$usersearch = isset( $_REQUEST['s'] ) ? trim( $_REQUEST['s'] ) : '';
|
||||
$usersearch = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : '';
|
||||
|
||||
$role = isset( $_REQUEST['role'] ) ? $_REQUEST['role'] : '';
|
||||
|
||||
|
|
Loading…
Reference in New Issue