From 2db2ef3ec95f81a04acd5c143a39f0d8c06c4cae Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 25 Oct 2011 06:57:52 -0400
Subject: [PATCH] - Fix handling of <title> tag for cases where (malformed) HTML content contains more than one <title> tag

---
 program/steps/mail/func.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index f1cc304..f9352a3 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -559,7 +559,7 @@
   // special replacements (not properly handled by washtml class)
   $html_search = array(
     '/(<\/nobr>)(\s+)(<nobr>)/i',	// space(s) between <NOBR>
-    '/<title[^>]*>.*<\/title>/i',	// PHP bug #32547 workaround: remove title tag
+    '/<title[^>]*>[^<]*<\/title>/i',	// PHP bug #32547 workaround: remove title tag
     '/^(\0\0\xFE\xFF|\xFF\xFE\0\0|\xFE\xFF|\xFF\xFE|\xEF\xBB\xBF)/',	// byte-order mark (only outlook?)
     '/<html\s[^>]+>/i',			// washtml/DOMDocument cannot handle xml namespaces
   );

--
Gitblit v1.9.1