We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1960
    • 1 Posts
    Hi everyone,
    I found a bug which makes templates unusable after you saved them once: db->escape() adds slashes to the posted text which is slashed by the browser post form, obtaining many nice single,double,... slashes around the " (double quote) characters .
    To eliminate this bug, change the escape() function into file \manager\includes\extenders\dbapi.mysql.class.inc.php like this (just add a line):
       function escape($s) {
    	  // Add the following line:
    	  $s = stripslashes($s);
    	  if (function_exists('mysql_real_escape_string') && $this->conn) {
    
             $s = mysql_real_escape_string($s, $this->conn);
          } else {
             $s = mysql_escape_string($s);
          }
          return $s;
       }
    

      • 22303 MODX Staff
      • 10,725 Posts
      You likely have PHP 5.3 and have the deprecated feature magic_quotes_gpc enabled. As of MODx 1.0.2, if using PHP 5.3, you must disable magic_quotes_gpc in your PHP configuration.