esc_sql() for wp-includes

git-svn-id: https://develop.svn.wordpress.org/trunk@11978 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2009-09-27 05:33:56 +00:00
parent 343e591c2b
commit 737378702c
7 changed files with 15 additions and 15 deletions

View File

@@ -1756,7 +1756,7 @@ class WP_Query {
$search .= "{$searchand}(($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}'))";
$searchand = ' AND ';
}
$term = $wpdb->escape($q['s']);
$term = esc_sql($q['s']);
if (empty($q['sentence']) && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] )
$search .= " OR ($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}')";