diff --git a/NEWS b/NEWS index 997dd9fc..1dff7c4e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - fixed a problem with putting $ followed by numbers inside {strip} and + {/strip} tags. (Andrei) - fixed Config_File class to allow empty config paths (defaults to current directory). (Andrei) diff --git a/Smarty_Compiler.class.php b/Smarty_Compiler.class.php index 9a995042..8e2905da 100644 --- a/Smarty_Compiler.class.php +++ b/Smarty_Compiler.class.php @@ -141,7 +141,8 @@ class Smarty_Compiler extends Smarty { $strip_tags_modified = preg_replace('![\r\n]+!m', '', $strip_tags_modified); for ($i = 0; $i < count($strip_tags); $i++) $template_compiled = preg_replace("!{$ldq}strip{$rdq}.*?{$ldq}/strip{$rdq}!s", - $strip_tags_modified[$i], $template_compiled, 1); + $this->quote_replace($strip_tags_modified[$i]), + $template_compiled, 1); } // put header at the top of the compiled template diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 9a995042..8e2905da 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -141,7 +141,8 @@ class Smarty_Compiler extends Smarty { $strip_tags_modified = preg_replace('![\r\n]+!m', '', $strip_tags_modified); for ($i = 0; $i < count($strip_tags); $i++) $template_compiled = preg_replace("!{$ldq}strip{$rdq}.*?{$ldq}/strip{$rdq}!s", - $strip_tags_modified[$i], $template_compiled, 1); + $this->quote_replace($strip_tags_modified[$i]), + $template_compiled, 1); } // put header at the top of the compiled template