fixed removal of leading/trailing newlines in {strip}-blocks

This commit is contained in:
messju
2003-08-27 08:54:25 +00:00
parent bbd4e9a811
commit ea3896ce22
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- fixed removal of leading/trailing newlines in {strip}-blocks (messju)
- fixed proper escaping of " and ' with escape:javascript (messju)
- fixed bug in traversal of $smarty->plugins_dir-array. now the
first matching plugin is taken (messju)

View File

@@ -335,7 +335,7 @@ class Smarty_Compiler extends Smarty {
$strip_tags = $_match[0];
$_strip_search = array(
'%([^\\\\]\?>)\n%', // remove newlines after PHP close tags
"!{$ldq}/?strip{$rdq}|[\t ]+$|^[\t ]+!m", // remove leading/trailing space chars
"!{$ldq}/?strip{$rdq}|\s+$|^\s+!m", // remove leading/trailing space chars
'%[\r\n]+%m', // remove CRs and newlines
'%([^\\\\]\?>)%'); // replace newlines after PHP close tags
$_strip_replace = array(