Skip to content
Snippets Groups Projects
Commit bb1a30b2 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #384 from greezybacon/issue/212


email: (Almost) always convert html on text body

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 02a2a13e bb2d5c95
No related branches found
No related tags found
No related merge requests found
......@@ -139,12 +139,11 @@ class Mailer {
$mime = new Mail_mime();
// If the message is not explicitly declared to be a text message,
// then assume that it needs html processing to create a valid text
// body
$isHtml = true;
// Ensure that the 'text' option / hint is not set to true and that
// the message appears to be HTML -- that is, the first
// non-whitespace char is a '<' character
if (!(isset($options['text']) && $options['text'])
&& (!$cfg || $cfg->isHtmlThreadEnabled())) {
if (!(isset($options['text']) && $options['text'])) {
// Make sure nothing unsafe has creeped into the message
$message = Format::safe_html($message); //XXX??
$mime->setTXTBody(Format::html2text($message, 90, false));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment