WordPress.org

Make WordPress Core

Changeset 2684


Ignore:
Timestamp:
07/02/05 23:31:43 (9 years ago)
Author:
matt
Message:

Better escaping from class, fixes #1394

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-db.php

    r2598 r2684  
    7878     
    7979    function escape($str) { 
    80         return addslashes($str);                 
     80        if( !$this->dbh || version_compare( phpversion(), '4.3.0' ) == '-1' ) 
     81            return mysql_escape_string( $string ); 
     82        else 
     83            return mysql_real_escape_string( $string, $this->dbh ); 
    8184    } 
    8285 
Note: See TracChangeset for help on using the changeset viewer.