From fd5b113436c2242bfee11d99b837839e5eb5b96b Mon Sep 17 00:00:00 2001 From: andrey Date: Mon, 4 Jun 2001 14:37:32 +0000 Subject: [PATCH] Fixed a problem with $ inside strip tags. --- NEWS | 2 ++ Smarty_Compiler.class.php | 3 ++- libs/Smarty_Compiler.class.php | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) 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