fix email body plain
This commit is contained in:
@@ -145,16 +145,16 @@ class Email extends \Espo\Core\ORM\Entity
|
||||
$body = strip_tags($body);
|
||||
|
||||
$reList = [
|
||||
'/&(quot|#34);/i',
|
||||
'/&(amp|#38);/i',
|
||||
'/&(lt|#60);/i',
|
||||
'/&(gt|#62);/i',
|
||||
'/&(nbsp|#160);/i',
|
||||
'/&(iexcl|#161);/i',
|
||||
'/&(cent|#162);/i',
|
||||
'/&(pound|#163);/i',
|
||||
'/&(copy|#169);/i',
|
||||
'/&(reg|#174);/i',
|
||||
'&(quot|#34);',
|
||||
'&(amp|#38);',
|
||||
'&(lt|#60);',
|
||||
'&(gt|#62);',
|
||||
'&(nbsp|#160);',
|
||||
'&(iexcl|#161);',
|
||||
'&(cent|#162);',
|
||||
'&(pound|#163);',
|
||||
'&(copy|#169);',
|
||||
'&(reg|#174);',
|
||||
];
|
||||
$replaceList = [
|
||||
'',
|
||||
@@ -169,7 +169,9 @@ class Email extends \Espo\Core\ORM\Entity
|
||||
chr(174),
|
||||
];
|
||||
|
||||
$body = mb_ereg_replace($reList, $replaceList, $body);
|
||||
foreach ($reList as $i => $re) {
|
||||
$body = mb_ereg_replace($re, $replaceList[$i], $body, 'i');
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user