fixed ordering of replacements in trimwhitespace output filter

Thanks to Getty from IRC for reporting this.
This commit is contained in:
boots
2006-06-23 08:34:31 +00:00
parent 820fc04c9d
commit d39b035391
2 changed files with 3 additions and 2 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- fixed ordering of replacements in trimwhitespace output filter (Getty, boots)
- update mailto function plugin to work around a firefox/thunderbird - update mailto function plugin to work around a firefox/thunderbird
escaping bug (elijahlofgren, boots) escaping bug (elijahlofgren, boots)
- emulate %l in the date_format modifier on windows (boots) - emulate %l in the date_format modifier on windows (boots)

View File

@@ -50,13 +50,13 @@ function smarty_outputfilter_trimwhitespace($source, &$smarty)
$source = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source)); $source = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source));
// replace script blocks // 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 // replace pre blocks
smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source); smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source);
// replace textarea blocks // 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; return $source;
} }