From eab9f7f22b5f7bd8640ed7a066189d4e79266ec5 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Fri, 1 Nov 2013 15:26:29 +0000 Subject: [PATCH] Better decision on HTML email If the HTML ticket thread is enabled and the message is not explicitly declared to be text, then assume it is an HTML message. --- include/class.mailer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class.mailer.php b/include/class.mailer.php index e5165ba69..a53fcfc17 100644 --- a/include/class.mailer.php +++ b/include/class.mailer.php @@ -141,7 +141,7 @@ class Mailer { // the message appears to be HTML -- that is, the first // non-whitespace char is a '<' character if (!(isset($options['text']) && $options['text']) - && preg_match('/^\s*</', $message)) { + && $cfg->isHtmlThreadEnabled()) { // Make sure nothing unsafe has creeped into the message $message = Format::safe_html($message); //XXX?? $mime->setTXTBody(Format::html2text($message, 90, false)); -- GitLab