From 80c1eb7b688d6d5757ab02ed64f0a0185367f63c Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 21 Aug 2008 06:08:52 +0000 Subject: #1485287: allow underline in html charset for proper replacement --- program/steps/mail/func.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'program/steps') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index a40811155..d6f5b62a2 100644 --- a/program/steps/mail/func.inc +++ b/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 for malformed messages, washtml cannot work without that if (!preg_match('/(.*)<\\/head>/Uims', $html)) -- cgit v1.2.3