summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/func.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-17 07:47:32 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-17 07:47:32 +0000
commitdaf6ae637e8aec4de15319ec2e331bb7ca8840fa (patch)
tree5bfc4c493dad86a266cc06dc53be5e816aea5127 /roundcubemail/program/steps/mail/func.inc
parent3a2795cb78993a4b883a2abfe3b7938b58d48062 (diff)
- Smart Tags and NOBR tag support in html messages (#1485363, #1485327)
git-svn-id: https://svn.roundcube.net/trunk@1811 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/func.inc')
-rw-r--r--roundcubemail/program/steps/mail/func.inc11
1 files changed, 11 insertions, 0 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc
index 7e9f0fec3..3995bffe3 100644
--- a/roundcubemail/program/steps/mail/func.inc
+++ b/roundcubemail/program/steps/mail/func.inc
@@ -611,6 +611,17 @@ function rcmail_print_body($part, $p = array())
// PHP bug #32547 workaround: remove title tag
$html = preg_replace('/<title>.*<\/title>/', '', $html);
+ // 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>
+ );
+ $html_replace = array(
+ '\\1'.' &nbsp; '.'\\3',
+ '',
+ );
+ $html = preg_replace($html_search, $html_replace, $html);
+
// clean HTML with washhtml by Frederic Motte
$wash_opts = array(
'show_washed' => false,