From 995f28cbba0ee0700a9715f7f1106142e63f7005 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Mon, 4 Mar 2013 23:14:30 -0500
Subject: [PATCH] Decode html entities - outgoing emails are plain text for now

---
 include/class.mailer.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/class.mailer.php b/include/class.mailer.php
index debf2f849..b4ec97c24 100644
--- a/include/class.mailer.php
+++ b/include/class.mailer.php
@@ -94,7 +94,8 @@ class Mailer {
         //do some cleanup
         $to = preg_replace("/(\r\n|\r|\n)/s",'', trim($to));
         $subject = preg_replace("/(\r\n|\r|\n)/s",'', trim($subject));
-        $body = preg_replace("/(\r\n|\r)/s", "\n", trim($message));
+        //We're decoding html entities here becasuse we only support plain text for now - html support comming.
+        $body = Format::htmldecode(preg_replace("/(\r\n|\r)/s", "\n", trim($message)));
 
         /* Message ID - generated for each outgoing email */
         $messageId = sprintf('<%s%d-%s>', Misc::randCode(6), time(),
-- 
GitLab