X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Fsmarty%2Flibs%2Fplugins%2Foutputfilter.trimwhitespace.php;h=739fa39b021a36fe24d8b39efee9363f1aab8cc1;hb=9b7c11be09e7a553b26667f673c6315209ddc210;hp=01e35e03df93c829d32c127d9a8bf698da9fb2b2;hpb=95a6ccc277bc41d750ced09fe5a1a779bde342c7;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/smarty/libs/plugins/outputfilter.trimwhitespace.php b/wwwroot/smarty/libs/plugins/outputfilter.trimwhitespace.php index 01e35e0..739fa39 100644 --- a/wwwroot/smarty/libs/plugins/outputfilter.trimwhitespace.php +++ b/wwwroot/smarty/libs/plugins/outputfilter.trimwhitespace.php @@ -28,35 +28,35 @@ 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 // preceeded by a php close tag. $source = trim(preg_replace('/((?)\n)[\s]+/m', '\1', $source)); - // replace script blocks - smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source); + // replace textarea blocks + smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_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); + // replace script blocks + smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source); return $source; }