Skip to content

Commit

Permalink
#1485287: allow underline in html charset for proper replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Aug 21, 2008
1 parent 3b0eda1 commit 80c1eb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions program/steps/mail/func.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 80c1eb7

Please sign in to comment.