From 2b7ac99d04343661ba92959cf74739b3ab498099 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Fri, 31 Jan 2014 16:51:13 +0000
Subject: [PATCH] Assume system generated internal notes are HTML when not
 specified

---
 include/class.ticket.php | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/class.ticket.php b/include/class.ticket.php
index 7bfcdc7a6..fb6e5065b 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -1752,11 +1752,19 @@ class Ticket {
     function logNote($title, $note, $poster='SYSTEM', $alert=true) {
 
         $errors = array();
+        //Unless specified otherwise, assume HTML
+        if ($note && is_string($note))
+            $note = new HtmlThreadBody($note);
+
         return $this->postNote(
-                array('title' => $title, 'note' => $note),
+                array(
+                    'title' => $title,
+                    'note' => $note,
+                ),
                 $errors,
                 $poster,
-                $alert);
+                $alert
+        );
     }
 
     function postNote($vars, &$errors, $poster, $alert=true) {
-- 
GitLab