From 0072c46107c79d9e5c3c1abbdd69c9cfe092ddf3 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Wed, 13 May 2015 10:08:22 -0500
Subject: [PATCH] html: Disable `balance`, which corrupts some html

(Most notably is the mail from Outlook, which embeds block elements inside
of <font> elements.)
---
 include/class.format.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class.format.php b/include/class.format.php
index 1dbab59b5..bf0ae3e56 100644
--- a/include/class.format.php
+++ b/include/class.format.php
@@ -181,7 +181,7 @@ class Format {
             $html);
         $config = array(
             'safe' => 1, //Exclude applet, embed, iframe, object and script tags.
-            'balance' => 1, //balance and close unclosed tags.
+            'balance' => 0, // No balance — corrupts poorly formatted Outlook html
             'comment' => 1, //Remove html comments (OUTLOOK LOVE THEM)
             'tidy' => -1,
             'deny_attribute' => 'id',
-- 
GitLab