summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-09-20 18:30:27 +0000
committeralecpl <alec@alec.pl>2011-09-20 18:30:27 +0000
commiteeae0db10cbd645a6f4abe6a16b2876cd1f0afe5 (patch)
tree3ffdf3b8a8063b2edd197ffefc88b8b4a773a877 /program
parent7bf3ce72e56aff9b9b05d450a58eef79d66fb238 (diff)
- Fix forwarded attachments, broken in r5204
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 58bad75c8..95e352a1b 100644
--- a/program/include/rcube_imap.php
+++ b/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;