mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
* Mail: check non-utf8 body, if it might be utf-8, to display readable
This commit is contained in:
parent
832f105982
commit
be212f908c
@ -3340,7 +3340,15 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
||||
if(($singleBodyPart['mimeType'] == 'text/html' || $singleBodyPart['mimeType'] == 'text/plain') &&
|
||||
strtoupper($singleBodyPart['charSet']) != 'UTF-8')
|
||||
{
|
||||
$singleBodyPart['body'] = preg_replace($sar,$rar,$singleBodyPart['body']);
|
||||
// check if client set a wrong charset and content is utf-8 --> use utf-8
|
||||
if (preg_match('//u', $singleBodyPart['body']))
|
||||
{
|
||||
$singleBodyPart['charSet'] = 'UTF-8';
|
||||
}
|
||||
else
|
||||
{
|
||||
$singleBodyPart['body'] = preg_replace($sar,$rar,$singleBodyPart['body']);
|
||||
}
|
||||
}
|
||||
//error_log(__METHOD__.__LINE__.'reports:'.$singleBodyPart['charSet']);
|
||||
if ($singleBodyPart['charSet']=='us-ascii')
|
||||
|
Loading…
Reference in New Issue
Block a user