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:23 +00:00
parent 126e6386aa
commit 04fc43ef6c

View File

@ -464,7 +464,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
);
$_body = preg_replace($search,"",$_body);
$body = $kses->Parse($_body);