From 571d065f21a4d186671d59dc75666374a6c58065 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Tue, 20 May 2014 11:48:41 -0500 Subject: [PATCH] email: Don't sanitize and munge ws for emails If the HTML ticket thread is disabled, outgoing emails will have a text thread body placed inside an HTML template. The template and message are then sanitized and converted to text. However, htmLawed will munge the white space in the message before converting to text. This patch disables sanitizing. I think it's fair to assume that the template and the message by the client or agent have been properly sanitized prior to sending out the email. --- include/class.mailer.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/class.mailer.php b/include/class.mailer.php index f037e083c..60bf67a95 100644 --- a/include/class.mailer.php +++ b/include/class.mailer.php @@ -161,8 +161,6 @@ class Mailer { && (!isset($options['reply-tag']) || $options['reply-tag'])) $message = "<div style=\"display:none\" data-mid=\"$mid_token\">$tag<br/><br/></div>$message"; - // Make sure nothing unsafe has creeped into the message - $message = Format::safe_html($message); //XXX?? $txtbody = rtrim(Format::html2text($message, 90, false)) . ($mid_token ? "\nRef-Mid: $mid_token\n" : ''); $mime->setTXTBody($txtbody); -- GitLab