mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-15 18:00:15 +01:00
improving the stripping of comments, since the regex stripped too much in some cases
This commit is contained in:
parent
126e6386aa
commit
04fc43ef6c
@ -464,7 +464,7 @@
|
|||||||
// no scripts allowed
|
// no scripts allowed
|
||||||
// clean out comments
|
// clean out comments
|
||||||
$search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript
|
$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 = preg_replace($search,"",$_body);
|
||||||
$body = $kses->Parse($_body);
|
$body = $kses->Parse($_body);
|
||||||
|
Loading…
Reference in New Issue
Block a user