Make WordPress Core


Ignore:
Timestamp:
07/05/2005 08:47:22 PM (21 years ago)
Author:
ryan
Message:

Use wpdb->escape instead of addslashes to prepare DB bound data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions-formatting.php

    r2689 r2699  
    524524
    525525function addslashes_gpc($gpc) {
    526     if (!get_magic_quotes_gpc()) {
    527         $gpc = addslashes($gpc);
    528     }
    529     return $gpc;
     526    global $wpdb;
     527
     528    if (get_magic_quotes_gpc()) {
     529        $gpc = stripslashes($gpc);
     530    }
     531
     532    return $wpdb->escape($gpc);
    530533}
    531534
Note: See TracChangeset for help on using the changeset viewer.