mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-10 15:30:21 +01:00
improving the stripping of comments, since the regex stripped too much in some cases
This commit is contained in:
parent
04fc43ef6c
commit
5d8bf0de21
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user