From 54029ea959b5f59447e3f0a01a453fd5fe0ba8fa Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 21 Dec 2013 14:49:00 +0100 Subject: Fix broken text/* attachments when forwarding/editing a message (#1489426) --- program/lib/Roundcube/rcube_imap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'program/lib/Roundcube/rcube_imap.php') diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index dc5305808..f1363caf7 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -2121,7 +2121,7 @@ class rcube_imap extends rcube_storage // convert charset (if text or message part) if ($body && preg_match('/^(text|message)$/', $o_part->ctype_primary)) { // Remove NULL characters if any (#1486189) - if (strpos($body, "\x00") !== false) { + if ($formatted && strpos($body, "\x00") !== false) { $body = str_replace("\x00", '', $body); } -- cgit v1.2.3