diff --git a/felamimail/inc/class.ajaxfelamimail.inc.php b/felamimail/inc/class.ajaxfelamimail.inc.php index 985d85ccd5..b66ea41337 100644 --- a/felamimail/inc/class.ajaxfelamimail.inc.php +++ b/felamimail/inc/class.ajaxfelamimail.inc.php @@ -1493,8 +1493,8 @@ class ajaxfelamimail //error_log(__METHOD__.'New:'.$sigText.'#'); if ($_currentMode == 'plain') { - $oldSigText = utf8_decode($bocompose->convertHTMLToText($oldSigText)); - $sigText = utf8_decode($bocompose->convertHTMLToText($sigText)); + $oldSigText = utf8_decode($bocompose->convertHTMLToText($oldSigText,true,true)); + $sigText = utf8_decode($bocompose->convertHTMLToText($sigText,true,true)); $_content = utf8_decode($_content); if($this->_debug) error_log(__METHOD__." Old signature:".$oldSigText); } @@ -1537,7 +1537,7 @@ class ajaxfelamimail $found = strpos($_content,trim($oldSigText)); } - if ($found !== false && $_oldSig != -2 && !(empty($oldSigText) || trim($bocompose->convertHTMLToText($oldSigText)) =='')) + if ($found !== false && $_oldSig != -2 && !(empty($oldSigText) || trim($bocompose->convertHTMLToText($oldSigText,true,true)) =='')) { //error_log(__METHOD__.'Old Content:'.$_content.'#'); $_oldSigText = preg_quote($oldSigText,'~'); @@ -1546,7 +1546,7 @@ class ajaxfelamimail //error_log(__METHOD__.'new Content:'.$_content.'#'); } - if ($_oldSig == -2 && (empty($oldSigText) || trim($bocompose->convertHTMLToText($oldSigText)) =='')) + if ($_oldSig == -2 && (empty($oldSigText) || trim($bocompose->convertHTMLToText($oldSigText,true,true)) =='')) { // if there is no sig selected, there is no way to replace a signature } diff --git a/felamimail/inc/class.bocompose.inc.php b/felamimail/inc/class.bocompose.inc.php index 2493404a3e..3fff8a4586 100644 --- a/felamimail/inc/class.bocompose.inc.php +++ b/felamimail/inc/class.bocompose.inc.php @@ -141,12 +141,12 @@ return 1; } - function convertHTMLToText(&$_html,$sourceishtml = true) + function convertHTMLToText(&$_html,$sourceishtml = true, $stripcrl=false) { $stripalltags = true; // third param is stripalltags, we may not need that, if the source is already in ascii if (!$sourceishtml) $stripalltags=false; - return felamimail_bo::convertHTMLToText($_html,false,$stripalltags); + return felamimail_bo::convertHTMLToText($_html,$stripcrl,$stripalltags); } function convertHTMLToTextTiny($_html) @@ -828,9 +828,9 @@ ($disableRuler ?'
':'
'). $signature; } - $_mailObject->AltBody = $this->convertHTMLToText($_formData['body']). + $_mailObject->AltBody = $this->convertHTMLToText($_formData['body'],true,true). ($disableRuler ?"\r\n":"\r\n-- \r\n"). - $this->convertHTMLToText($signature); + $this->convertHTMLToText($signature,true,true); #print "
$_mailObject->AltBody
"; #print htmlentities($_signature['signature']); } else { @@ -840,7 +840,7 @@ } else { $_mailObject->Body = $_formData['body']; } - $_mailObject->AltBody = $this->convertHTMLToText($_formData['body']); + $_mailObject->AltBody = $this->convertHTMLToText($_formData['body'],true,true); } // convert URL Images to inline images - if possible if ($_convertLinks) felamimail_bo::processURL2InlineImages($_mailObject, $_mailObject->Body); @@ -854,7 +854,7 @@ #$_mailObject->Body = $_formData['body']; if(!empty($signature)) { $_mailObject->Body .= ($disableRuler ?"\r\n":"\r\n-- \r\n"). - $this->convertHTMLToText($signature); + $this->convertHTMLToText($signature,true,true); } } diff --git a/felamimail/inc/class.uicompose.inc.php b/felamimail/inc/class.uicompose.inc.php index 19dea5a046..fa691b3d84 100644 --- a/felamimail/inc/class.uicompose.inc.php +++ b/felamimail/inc/class.uicompose.inc.php @@ -782,7 +782,7 @@ $signature = $boSignatures->getSignature(($presetSig ? $presetSig : $sessionData['signatureID'])); if ((isset($this->bocompose->preferencesArray['disableRulerForSignatureSeparation']) && $this->bocompose->preferencesArray['disableRulerForSignatureSeparation']) || - empty($signature->fm_signature) || trim($this->bocompose->convertHTMLToText($signature->fm_signature)) =='') + empty($signature->fm_signature) || trim($this->bocompose->convertHTMLToText($signature->fm_signature,true,true)) =='') { $disableRuler = true; } @@ -828,11 +828,11 @@ if ($insertSigOnTop === 'below') { - $sessionData['body'] = $font_span.$sessionData['body'].$before.($sessionData['mimeType'] == 'html'?$sigText:$this->bocompose->convertHTMLToText($sigText)); + $sessionData['body'] = $font_span.$sessionData['body'].$before.($sessionData['mimeType'] == 'html'?$sigText:$this->bocompose->convertHTMLToText($sigText,true,true)); } else { - $sessionData['body'] = $before.($sessionData['mimeType'] == 'html'?$sigText:$this->bocompose->convertHTMLToText($sigText)).$inbetween.$sessionData['body']; + $sessionData['body'] = $before.($sessionData['mimeType'] == 'html'?$sigText:$this->bocompose->convertHTMLToText($sigText,true,true)).$inbetween.$sessionData['body']; } } else