mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-30 03:43:40 +01:00
completely preserve html as given when requested
This commit is contained in:
parent
d39330abe3
commit
c96daf2482
@ -4707,6 +4707,8 @@ class emailadmin_imapbase
|
|||||||
$mailClass->activeMimeType = 'text/plain';
|
$mailClass->activeMimeType = 'text/plain';
|
||||||
if ($bodyParts[$i]['mimeType'] == 'text/html') {
|
if ($bodyParts[$i]['mimeType'] == 'text/html') {
|
||||||
$mailClass->activeMimeType = $bodyParts[$i]['mimeType'];
|
$mailClass->activeMimeType = $bodyParts[$i]['mimeType'];
|
||||||
|
if (!$preserveHTML)
|
||||||
|
{
|
||||||
// as translation::convert reduces \r\n to \n and purifier eats \n -> peplace it with a single space
|
// as translation::convert reduces \r\n to \n and purifier eats \n -> peplace it with a single space
|
||||||
$newBody = str_replace("\n"," ",$newBody);
|
$newBody = str_replace("\n"," ",$newBody);
|
||||||
// convert HTML to text, as we dont want HTML in infologs
|
// convert HTML to text, as we dont want HTML in infologs
|
||||||
@ -4757,6 +4759,7 @@ class emailadmin_imapbase
|
|||||||
$mailClass->getCleanHTML($newBody); // remove stuff we regard as unwanted
|
$mailClass->getCleanHTML($newBody); // remove stuff we regard as unwanted
|
||||||
if ($preserveHTML==false) $newBody = str_replace("<br />","\r\n",$newBody);
|
if ($preserveHTML==false) $newBody = str_replace("<br />","\r\n",$newBody);
|
||||||
//error_log(__METHOD__.' ('.__LINE__.') '.' after getClean:'.$newBody);
|
//error_log(__METHOD__.' ('.__LINE__.') '.' after getClean:'.$newBody);
|
||||||
|
}
|
||||||
$message .= $newBody;
|
$message .= $newBody;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user