From 86b0bcde2dab6fbb21b3faa2fd22d32eecef784c Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 19 Nov 2013 13:14:47 -0600
Subject: [PATCH] email: drop <!DOCTYPE ...> strings from email body

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

diff --git a/include/class.format.php b/include/class.format.php
index 5146c251e..539bf5f51 100644
--- a/include/class.format.php
+++ b/include/class.format.php
@@ -207,8 +207,10 @@ class Format {
         // Remove HEAD and STYLE sections
         $html = preg_replace(
             array(':<(head|style).+</\1>:is',   # <head> and <style> sections
-                  ':<!\[[^]<]+\]>:'),           # <![if !mso]> and friends
-            array('', ''),
+                  ':<!\[[^]<]+\]>:',            # <![if !mso]> and friends
+                  ':<!DOCTYPE[^>]+>:',          # <!DOCTYPE ... >
+            ),
+            array('', '', ''),
             $html);
         $config = array(
             'safe' => 1, //Exclude applet, embed, iframe, object and script tags.
-- 
GitLab