summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/lib/html2text.php7
-rw-r--r--program/steps/mail/compose.inc3
-rw-r--r--program/steps/mail/sendmail.inc2
3 files changed, 7 insertions, 5 deletions
diff --git a/program/lib/html2text.php b/program/lib/html2text.php
index 4180cac28..938dfecfe 100644
--- a/program/lib/html2text.php
+++ b/program/lib/html2text.php
@@ -232,7 +232,7 @@ class html2text
'--',
'-',
'*',
- '£',
+ '£',
'EUR', // Euro sign. € ?
'', // Unknown/unhandled entities
' ' // Runs of spaces, post-handling
@@ -465,7 +465,10 @@ class html2text
// Convert <PRE>
$this->_convert_pre($text);
-
+
+ // Replace known html entities
+ $text = html_entity_decode($text, ENT_COMPAT, 'UTF-8');
+
// Run our defined search-and-replace
$text = preg_replace($this->search, $this->replace, $text);
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index d1d913b68..d4348f287 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -323,8 +323,7 @@ function rcmail_compose_header_from($attrib)
if ($a_signatures[$identity_id]['is_html'])
{
$h2t = new html2text($a_signatures[$identity_id]['text'], false, false);
- $plainTextPart = $h2t->get_text();
- $a_signatures[$identity_id]['plain_text'] = trim(html_entity_decode($plainTextPart, ENT_NOQUOTES, 'UTF-8'));
+ $a_signatures[$identity_id]['plain_text'] = trim($h2t->get_text());
}
}
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 784d46a8f..7ee6dd4cc 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -265,7 +265,7 @@ if ($isHtml)
// empty message body breaks attachment handling in drafts
$plainTextPart = "\r\n";
}
- $MAIL_MIME->setTXTBody(html_entity_decode($plainTextPart, ENT_COMPAT, 'utf-8'));
+ $MAIL_MIME->setTXTBody($plainTextPart);
// look for "emoticon" images from TinyMCE and copy into message as attachments
rcmail_attach_emoticons($MAIL_MIME);