From d39b035391a5d7bf1d2c5b5ab80710b4f6f26063 Mon Sep 17 00:00:00 2001 From: boots Date: Fri, 23 Jun 2006 08:34:31 +0000 Subject: [PATCH] fixed ordering of replacements in trimwhitespace output filter Thanks to Getty from IRC for reporting this. --- NEWS | 1 + libs/plugins/outputfilter.trimwhitespace.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index f6ed767a..942e49c1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +- fixed ordering of replacements in trimwhitespace output filter (Getty, boots) - update mailto function plugin to work around a firefox/thunderbird escaping bug (elijahlofgren, boots) - emulate %l in the date_format modifier on windows (boots) diff --git a/libs/plugins/outputfilter.trimwhitespace.php b/libs/plugins/outputfilter.trimwhitespace.php index 01e35e03..336f1846 100644 --- a/libs/plugins/outputfilter.trimwhitespace.php +++ b/libs/plugins/outputfilter.trimwhitespace.php @@ -50,13 +50,13 @@ function smarty_outputfilter_trimwhitespace($source, &$smarty) $source = trim(preg_replace('/((?)\n)[\s]+/m', '\1', $source)); // replace script blocks - smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source); + smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_script_blocks, $source); // replace pre blocks smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source); // replace textarea blocks - smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source); + smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_textarea_blocks, $source); return $source; }