summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-12-27 19:45:49 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-12-27 19:45:49 +0000
commite06598ef090c54e19a1495f57310f087f865048c (patch)
tree57e5d2ce388a597bba1f4c188c2330cad7d5c77b
parentff0a1bced5567acd1de5096612df16ab9bd3d936 (diff)
#1485647: handle PRE_TEXT tags in html messages (+ small fixes)
git-svn-id: https://svn.roundcube.net/trunk@2190 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/steps/mail/func.inc14
1 files changed, 8 insertions, 6 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc
index 9a92c19b7..b3d7cfc85 100644
--- a/roundcubemail/program/steps/mail/func.inc
+++ b/roundcubemail/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+)(<nobr>)/i', // space(s) between <NOBR>
- '/(<[\/]*st1:[^>]+>)/i', // Microsoft's Smart Tags <ST1>
- '/<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?)
+ '/(<[\/]*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'.' &nbsp; '.'\\3',
'',
'',
'',
- '\\1',
'',
+ '',
+ '\\1',
);
$html = preg_replace($html_search, $html_replace, $html);