mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
<script><!-- …
is bad practice and should not be encouraged.
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user