diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-07 12:51:21 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-07 12:51:21 +0000 |
| commit | 58e46212b590ae379d3ae290c1c2a4a5e45d0d10 (patch) | |
| tree | 849807fa4418ace2608ca38d4e44e61c44854a49 /roundcubemail/program/steps | |
| parent | 0478bfae796e079b6bc09316ded8c1df30220f44 (diff) | |
Change meta-charset specififcation in HTML to UTF-8; no need for mb_convert_encoding() anymore
git-svn-id: https://svn.roundcube.net/trunk@1487 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index 79a84ccb4..f4b18411e 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -534,12 +534,15 @@ function rcmail_print_body($part, $safe=false, $plain=false) } // text/html else if ($part->ctype_secondary == 'html') { + // charset was converted to UTF-8 in rcube_imap::get_message_part() -> change charset specification in HTML accordingly + $html = preg_replace('/(\s+content=[\'"]\w+\/\w+;\s+charset)=([a-z0-9-]+)/i', '\\1='.RCMAIL_CHARSET, $part->body); + // clean HTML with washhtml by Frederic Motte - $body = washtml::wash($part->body, array( + $body = washtml::wash($html, array( 'show_washed' => false, 'allow_remote' => $safe, 'blocked_src' => "./program/blocked.gif", - 'charset' => 'UTF-8', + 'charset' => RCMAIL_CHARSET, 'cid_map' => $part->replaces, ), $full_inline); |
