fixed escaping of backslashes in Smarty_Compiler::_quote_replace()

This commit is contained in:
messju
2004-06-27 19:37:34 +00:00
parent ada93a0c29
commit b43d689706
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@@ -1,3 +1,5 @@
- fix escaping of backslashes in Smarty_Compiler::_quote_replace() (messju)
Version 2.6.3 (June 16, 2004)
-----------------------------

View File

@@ -2120,7 +2120,7 @@ class Smarty_Compiler extends Smarty {
*/
function _quote_replace($string)
{
return preg_replace('![\\$]\d!', '\\\\\\0', $string);
return strtr($string, array('\\' => '\\\\', '$' => '\\$'));
}
/**