diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-08-21 06:08:52 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-08-21 06:08:52 +0000 |
| commit | 0b7380523c0b8856071d5344f1b558536ea43903 (patch) | |
| tree | f69e25ca03025bb17ee2df54f06fb66ccf49d311 | |
| parent | 2b15fa5b187530d55cb2d41e1451664baef4dd99 (diff) | |
#1485287: allow underline in html charset for proper replacement
git-svn-id: https://svn.roundcube.net/trunk@1662 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index a40811155..d6f5b62a2 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -576,8 +576,8 @@ function rcmail_print_body($part, $p = array()) 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 = $part->body; - if (preg_match('/(\s+content=[\'"]\w+\/\w+;\s*charset)=([a-z0-9-]+)/i', $html)) - $html = preg_replace('/(\s+content=[\'"]\w+\/\w+;\s*charset)=([a-z0-9-]+)/i', '\\1='.RCMAIL_CHARSET, $html); + if (preg_match('/(\s+content=[\'"]\w+\/\w+;\s*charset)=([a-z0-9-_]+)/i', $html)) + $html = preg_replace('/(\s+content=[\'"]\w+\/\w+;\s*charset)=([a-z0-9-_]+)/i', '\\1='.RCMAIL_CHARSET, $html); else { // add <head> for malformed messages, washtml cannot work without that if (!preg_match('/<head>(.*)<\\/head>/Uims', $html)) |
