X-Git-Url: https://git.sur5r.net/?p=contagged;a=blobdiff_plain;f=inc%2Fsmarty%2Fplugins%2Foutputfilter.trimwhitespace.php;fp=inc%2Fsmarty%2Fplugins%2Foutputfilter.trimwhitespace.php;h=739fa39b021a36fe24d8b39efee9363f1aab8cc1;hp=97b0d21e8495185671a190b90db9c426a73482a1;hb=f204d4d8fe772001803c3509f8be0528840be4eb;hpb=fe4b8192a9eb0b485673ee3854d6fc14cbe1dda1 diff --git a/inc/smarty/plugins/outputfilter.trimwhitespace.php b/inc/smarty/plugins/outputfilter.trimwhitespace.php index 97b0d21..739fa39 100644 --- a/inc/smarty/plugins/outputfilter.trimwhitespace.php +++ b/inc/smarty/plugins/outputfilter.trimwhitespace.php @@ -28,21 +28,21 @@ function smarty_outputfilter_trimwhitespace($source, &$smarty) { // Pull out the script blocks - preg_match_all("!]+>.*?!is", $source, $match); + preg_match_all("!]*?>.*?!is", $source, $match); $_script_blocks = $match[0]; - $source = preg_replace("!]+>.*?!is", + $source = preg_replace("!]*?>.*?!is", '@@@SMARTY:TRIM:SCRIPT@@@', $source); // Pull out the pre blocks - preg_match_all("!
.*?
!is", $source, $match); + preg_match_all("!]*?>.*?!is", $source, $match); $_pre_blocks = $match[0]; - $source = preg_replace("!
.*?
!is", + $source = preg_replace("!]*?>.*?!is", '@@@SMARTY:TRIM:PRE@@@', $source); - + // Pull out the textarea blocks - preg_match_all("!]+>.*?!is", $source, $match); + preg_match_all("!]*?>.*?!is", $source, $match); $_textarea_blocks = $match[0]; - $source = preg_replace("!]+>.*?!is", + $source = preg_replace("!]*?>.*?!is", '@@@SMARTY:TRIM:TEXTAREA@@@', $source); // remove all leading spaces, tabs and carriage returns NOT