modifier.escape.php bug

From: Date: Mon, 17 Feb 2003 22:58:51 +0000
Subject: modifier.escape.php bug
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-708@lists.php.net to get a copy of this message
Hi Monte, There is a bug in the cvs version of the escape modifier: ---------------------------- case 'quotes': // escape unescaped single quotes return preg_replace("%(?<!\\\\)'%", "\\'", $string); case 'hex': // escape every character into hex BUG HERE==> return = ''; for ($x=0; $x < strlen($string); $x++) { $return .= '%' . bin2hex($string[$x]); } return $return; case 'hexentity': BUG HERE==> return = ''; for ($x=0; $x < strlen($string); $x++) { $return .= '&#x' . bin2hex($string[$x]) . ';'; } return $return; ------------------------------------- "parse error, unexpected '=' in modifier.escape.php on line 29" It should be $return = ''; Eduardo Morales

« previous php.smarty.dev (#708) next »