Consistently trim and unslash search queries for the users list tables.

props aubreypwd.
fixes #26115.


git-svn-id: https://develop.svn.wordpress.org/trunk@27077 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-02-02 22:09:19 +00:00
parent ed1ece6e3b
commit 8c3ad4e860
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
function prepare_items() { function prepare_items() {
global $usersearch, $role, $wpdb, $mode; 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' ); $users_per_page = $this->get_items_per_page( 'users_network_per_page' );

View File

@ -35,7 +35,7 @@ class WP_Users_List_Table extends WP_List_Table {
function prepare_items() { function prepare_items() {
global $role, $usersearch; 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'] : ''; $role = isset( $_REQUEST['role'] ) ? $_REQUEST['role'] : '';