From 3348176abaed294640761e55fedf5491bf8cddfc Mon Sep 17 00:00:00 2001 From: alecpl Date: Sat, 27 Dec 2008 19:45:49 +0000 Subject: #1485647: handle PRE_TEXT tags in html messages (+ small fixes) --- program/steps/mail/func.inc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 9a92c19b7..b3d7cfc85 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -642,19 +642,21 @@ function rcmail_print_body($part, $p = array()) // special replacements (not properly handled by washtml class) $html_search = array( '/(<\/nobr>)(\s+)()/i', // space(s) between - '/(<[\/]*st1:[^>]+>)/i', // Microsoft's Smart Tags - '/.*<\/title>/i', // PHP bug #32547 workaround: remove title tag - '/<html[^>]*>/im', // malformed html: remove html tags (#1485139) - '/<\/html>/i', // malformed html: remove html tags (#1485139) - '/^[\xFE\xFF\xBB\xBF\x00]+((?:<\!doctype|\<html))/im', // remove byte-order mark (only outlook?) + '/(<[\/]*st1:[^>]+>)/i', // Microsoft's Smart Tags <ST1> + '/<\/?rte_text>/i', // Rich Text Editor tags (#1485647) + '/<title>.*<\/title>/i', // PHP bug #32547 workaround: remove title tag + '/<html[^>]*>/im', // malformed html: remove html tags (#1485139) + '/<\/html>/i', // malformed html: remove html tags (#1485139) + '/^[\xFE\xFF\xBB\xBF\x00]+((?:<\!doctype|\<html))/im', // remove byte-order mark (only outlook?) ); $html_replace = array( '\\1'.'   '.'\\3', '', '', '', - '\\1', '', + '', + '\\1', ); $html = preg_replace($html_search, $html_replace, $html); -- cgit v1.2.3