improving the stripping of comments, since the regex stripped too much in some cases

This commit is contained in:
Klaus Leithoff 2008-08-21 11:38:43 +00:00
parent 04fc43ef6c
commit 5d8bf0de21

View File

@ -1006,7 +1006,7 @@
// no scripts allowed
// clean out comments
$search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript
'@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments including CDATA
'@<!--[\s\S]*?[ \t\n\r]*-->@' // Strip multi-line comments including CDATA
);
$newBody = preg_replace($search,"",$newBody);