revert to last versio

This commit is contained in:
monte.ohrt
2008-03-05 13:47:28 +00:00
parent 6be653b234
commit 7aa88fbace

View File

@@ -28,21 +28,21 @@
function smarty_outputfilter_trimwhitespace($source, &$smarty) function smarty_outputfilter_trimwhitespace($source, &$smarty)
{ {
// Pull out the script blocks // Pull out the script blocks
preg_match_all("!<script[^>]+>.*</script>!is", $source, $match); preg_match_all("!<script[^>]+>.*?</script>!is", $source, $match);
$_script_blocks = $match[0]; $_script_blocks = $match[0];
$source = preg_replace("!<script[^>]+>.*</script>!is", $source = preg_replace("!<script[^>]+>.*?</script>!is",
'@@@SMARTY:TRIM:SCRIPT@@@', $source); '@@@SMARTY:TRIM:SCRIPT@@@', $source);
// Pull out the pre blocks // Pull out the pre blocks
preg_match_all("!<pre>.*</pre>!is", $source, $match); preg_match_all("!<pre>.*?</pre>!is", $source, $match);
$_pre_blocks = $match[0]; $_pre_blocks = $match[0];
$source = preg_replace("!<pre>.*</pre>!is", $source = preg_replace("!<pre>.*?</pre>!is",
'@@@SMARTY:TRIM:PRE@@@', $source); '@@@SMARTY:TRIM:PRE@@@', $source);
// Pull out the textarea blocks // Pull out the textarea blocks
preg_match_all("!<textarea[^>]+>.*</textarea>!is", $source, $match); preg_match_all("!<textarea[^>]+>.*?</textarea>!is", $source, $match);
$_textarea_blocks = $match[0]; $_textarea_blocks = $match[0];
$source = preg_replace("!<textarea[^>]+>.*</textarea>!is", $source = preg_replace("!<textarea[^>]+>.*?</textarea>!is",
'@@@SMARTY:TRIM:TEXTAREA@@@', $source); '@@@SMARTY:TRIM:TEXTAREA@@@', $source);
// remove all leading spaces, tabs and carriage returns NOT // remove all leading spaces, tabs and carriage returns NOT