From 883448243f446c25a06dd793cc72356e01a972a0 Mon Sep 17 00:00:00 2001 From: alec Date: Mon, 16 May 2011 07:13:01 +0000 Subject: - Trim HTML message before washing, to make sure that BOM is removed even when prepended by some whitespace chars (#1487915) git-svn-id: https://svn.roundcube.net/trunk@4772 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/mail/func.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index cfdad791a..36b4c02a6 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -575,7 +575,7 @@ function rcmail_wash_html($html, $p = array(), $cid_replaces) '', '', ); - $html = preg_replace($html_search, $html_replace, $html); + $html = preg_replace($html_search, $html_replace, trim($html)); // PCRE errors handling (#1486856), should we use something like for every preg_* use? if ($html === null && ($preg_error = preg_last_error()) != PREG_NO_ERROR) { -- cgit v1.2.3