mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
feature 2816: {strip} smarty tag can introduce bugs in javascript + fix picture.tpl
git-svn-id: http://piwigo.org/svn/trunk@19575 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -332,7 +332,7 @@ class Smarty_Compiler extends Smarty {
|
||||
/* strip all $text_blocks before the next '/strip' */
|
||||
for ($j = $i + 1; $j < $for_max; $j++) {
|
||||
/* remove leading and trailing whitespaces of each line */
|
||||
$text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $text_blocks[$j]);
|
||||
$text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', ' ', $text_blocks[$j]);
|
||||
if ($compiled_tags[$j] == '{/strip}') {
|
||||
/* remove trailing whitespaces from the last text_block */
|
||||
$text_blocks[$j] = rtrim($text_blocks[$j]);
|
||||
|
||||
Reference in New Issue
Block a user