diff --git a/NEWS b/NEWS index 533e3a54..e2d28e0c 100644 --- a/NEWS +++ b/NEWS @@ -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) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 2d6481ba..2fc8a90d 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -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(