diff --git a/NEWS b/NEWS index 419ca090..6796b7b4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - fix escaping of backslashes in Smarty_Compiler::_quote_replace() (messju) + Version 2.6.3 (June 16, 2004) ----------------------------- diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 77939f81..1a3ea9ac 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -2120,7 +2120,7 @@ class Smarty_Compiler extends Smarty { */ function _quote_replace($string) { - return preg_replace('![\\$]\d!', '\\\\\\0', $string); + return strtr($string, array('\\' => '\\\\', '$' => '\\$')); } /**