mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 23:29:31 +01:00
handle problem with mdash and ndash when switching inline signatures, as their utf8 representations fail to convert using utf8_decode
This commit is contained in:
parent
66a4b635e5
commit
fce73d3054
@ -1443,6 +1443,7 @@ class ajaxfelamimail
|
||||
$signature = $boSignatures->getSignature($_signatureID);
|
||||
$sigText = $signature->fm_signature;
|
||||
//error_log(__METHOD__.'Old:'.$oldSigText.'#');
|
||||
//error_log(__METHOD__.'New:'.$sigText.'#');
|
||||
if ($_currentMode == 'plain')
|
||||
{
|
||||
$oldSigText = utf8_decode($bocompose->convertHTMLToText($oldSigText));
|
||||
@ -1465,7 +1466,7 @@ class ajaxfelamimail
|
||||
$_content = str_replace("\n",'\n',$_content); // dont know why, but \n screws up preg_replace
|
||||
$_content = preg_replace($reg='|'.preg_quote('<!-- HTMLSIGBEGIN -->','|').'.*'.preg_quote('<!-- HTMLSIGEND -->','|').'|u',
|
||||
$rep='<!-- HTMLSIGBEGIN -->'.$sigText.'<!-- HTMLSIGEND -->', $in=$_content, -1, $replaced);
|
||||
$_content = str_replace('\n',"\n",$_content);
|
||||
$_content = str_replace(array('\n',"\xe2\x80\x93","\xe2\x80\x94"),array("\n",'–','—'),$_content);
|
||||
//error_log(__METHOD__."() preg_replace('$reg', '$rep', '$in', -1)='$_content', replaced=$replaced");
|
||||
if ($replaced)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user