<script><!-- … is bad practice and should not be encouraged.

This commit is contained in:
rodneyrehm
2012-06-28 20:13:17 +00:00
parent d59870d557
commit 79087f409f

View File

@@ -40,6 +40,7 @@ function smarty_outputfilter_trimwhitespace($source, Smarty_Internal_Template $s
} }
// Strip all HTML-Comments // Strip all HTML-Comments
// yes, even the ones in <script> - see http://stackoverflow.com/a/808850/515124
$source = preg_replace( '#<!--.*?-->#ms', '', $source ); $source = preg_replace( '#<!--.*?-->#ms', '', $source );
// capture html elements not to be messed with // capture html elements not to be messed with