diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-20 18:30:27 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-20 18:30:27 +0000 |
| commit | 112765f78771686162f42d1f0afae7e33d7d6bff (patch) | |
| tree | 31eac2305079dbb8fda8b3d3158761a9781e6c9c /roundcubemail/program | |
| parent | c3db2c46d5d6a5525038376d6e677f73de4e2992 (diff) | |
- Fix forwarded attachments, broken in r5204
git-svn-id: https://svn.roundcube.net/trunk@5253 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index 58bad75c8..95e352a1b 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/program/include/rcube_imap.php @@ -2390,17 +2390,17 @@ class rcube_imap return true; } - // Remove NULL characters (#1486189) - $body = str_replace("\x00", '', $body); - // convert charset (if text or message part) - if ($body && !$skip_charset_conv && - preg_match('/^(text|message)$/', $o_part->ctype_primary) - ) { - if (!$o_part->charset || strtoupper($o_part->charset) == 'US-ASCII') { - $o_part->charset = $this->default_charset; + if ($body && preg_match('/^(text|message)$/', $o_part->ctype_primary)) { + // Remove NULL characters (#1486189) + $body = str_replace("\x00", '', $body); + + if (!$skip_charset_conv) { + if (!$o_part->charset || strtoupper($o_part->charset) == 'US-ASCII') { + $o_part->charset = $this->default_charset; + } + $body = rcube_charset_convert($body, $o_part->charset); } - $body = rcube_charset_convert($body, $o_part->charset); } return $body; |
