forked from extern/egroupware
-handling HTML comments before doing the kses parse. this fixes a problem with displaying HTML emails, showing some leftovers from comments in
style definitions, which are used as browser switch.
This commit is contained in:
parent
0baf83c3a8
commit
b377de6b86
@ -1003,6 +1003,13 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// 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
|
||||||
|
);
|
||||||
|
$newBody = preg_replace($search,"",$newBody);
|
||||||
|
|
||||||
$newBody = $singleBodyPart['body'];
|
$newBody = $singleBodyPart['body'];
|
||||||
$newBody = $this->highlightQuotes($newBody);
|
$newBody = $this->highlightQuotes($newBody);
|
||||||
$newBody = $this->kses->Parse($newBody);
|
$newBody = $this->kses->Parse($newBody);
|
||||||
|
Loading…
Reference in New Issue
Block a user