wp_unslash() needs to always comes first

This commit is contained in:
Grzegorz Rola 2017-11-06 19:10:33 +01:00
parent 4f4a3460a3
commit 0c9ad20986
1 changed files with 1 additions and 2 deletions

View File

@ -336,8 +336,7 @@ class WC_Admin_Log_Table_List extends WP_List_Table {
}
if ( ! empty( $_REQUEST['s'] ) ) {
$where_conditions[] = 'message like %s';
$s = wp_unslash( trim( $_REQUEST[ 's' ] ) );
$where_values[] = $wpdb->esc_like( $s );
$where_values[] = '%' . $wpdb->esc_like( wc_clean( wp_unslash( $_REQUEST['s'] ) ) ) . '%';
}
if ( ! empty( $where_conditions ) ) {