Use wpdb->escape instead of addslashes to prepare DB bound data.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -523,10 +523,13 @@ function trailingslashit($string) {
|
||||
}
|
||||
|
||||
function addslashes_gpc($gpc) {
|
||||
if (!get_magic_quotes_gpc()) {
|
||||
$gpc = addslashes($gpc);
|
||||
global $wpdb;
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$gpc = stripslashes($gpc);
|
||||
}
|
||||
return $gpc;
|
||||
|
||||
return $wpdb->escape($gpc);
|
||||
}
|
||||
|
||||
function antispambot($emailaddy, $mailto=0) {
|
||||
|
||||
Reference in New Issue
Block a user