summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-04-17 06:47:30 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-04-17 06:47:30 +0000
commitd6bd2e6d2e2a690cbac0401d6e57435c93f91f33 (patch)
tree7ba87dcddd6a1860a382fd7b62f38a75f2afe5e1 /roundcubemail/program/steps
parentbb402171564dafb193f30094e4b883ca739a1ae0 (diff)
- Fix UTF-8 byte-order mark removing (#1485514)
git-svn-id: https://svn.roundcube.net/trunk@2397 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
-rw-r--r--roundcubemail/program/steps/mail/func.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc
index f9d560a97..8931cfa4e 100644
--- a/roundcubemail/program/steps/mail/func.inc
+++ b/roundcubemail/program/steps/mail/func.inc
@@ -660,7 +660,7 @@ function rcmail_wash_html($html, $p = array(), $cid_replaces)
'/<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?)
+ '/^(\0\0\xFE\xFF|\xFF\xFE\0\0|\xFE\xFF|\xFF\xFE|\xEF\xBB\xBF)/', // byte-order mark (only outlook?)
);
$html_replace = array(
'\\1'.' &nbsp; '.'\\3',
@@ -669,7 +669,7 @@ function rcmail_wash_html($html, $p = array(), $cid_replaces)
'',
'',
'',
- '\\1',
+ '',
);
$html = preg_replace($html_search, $html_replace, $html);