From 2463145b308bb0cef7949c06bc3654795a87ee8f Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 12 Nov 2013 17:13:43 -0600
Subject: [PATCH] Use <pre> elements for plain/text API messages

---
 include/class.api.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/class.api.php b/include/class.api.php
index 23ae8a589..fff9c2dd3 100644
--- a/include/class.api.php
+++ b/include/class.api.php
@@ -337,7 +337,7 @@ class ApiXmlDataParser extends XmlDataParser {
                 if (isset($value['encoding']))
                     $value['body'] = Format::utf8encode($value['body'], $value['encoding']);
                 if (!isset($value['type']) || $value['type'] != 'text/html')
-                    $value = sprintf('<div style="white-space:pre-wrap">%s</div>',
+                    $value = sprintf('<pre>%s</pre>',
                         Format::htmlchars($value['body']));
                 else
                     $value = $value['body'];
@@ -381,7 +381,7 @@ class ApiJsonDataParser extends JsonDataParser {
                 // Allow message specified in RFC 2397 format
                 $data = Format::parseRfc2397($value, 'utf-8');
                 if (!isset($data['type']) || $data['type'] != 'text/html')
-                    $value = sprintf('<div style="white-space:pre-wrap">%s</div>',
+                    $value = sprintf('<pre>%s</pre>',
                         Format::htmlchars($data['data']));
                 else
                     $value = $data['data'];
-- 
GitLab