summaryrefslogtreecommitdiff
path: root/program/include/rcube_message.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-02-03 18:59:59 +0000
committeralecpl <alec@alec.pl>2011-02-03 18:59:59 +0000
commit02b6e614ca7fc60dfd5e13669a1c941c0f4190e6 (patch)
tree12f5e14ac0cd51afd71516f0745e569a42ab196f /program/include/rcube_message.php
parent62481f34e612c001bd7c91727787c60ceac579f3 (diff)
- Fix handling of non-image attachments in multipart/related messages (#1487750)
Diffstat (limited to 'program/include/rcube_message.php')
-rw-r--r--program/include/rcube_message.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index af91b8001..ec034db69 100644
--- a/program/include/rcube_message.php
+++ b/program/include/rcube_message.php
@@ -506,6 +506,16 @@ class rcube_message
) {
$this->attachments[] = $inline_object;
}
+ // MS Outlook sometimes also adds non-image attachments as related
+ // We'll add all such attachments to the attachments list
+ // Warning: some browsers support pdf in <img/>
+ // @TODO: we should fetch HTML body and find attachment's content-id
+ // to handle also image attachments without reference in the body
+ if (!empty($inline_object->filename)
+ && !preg_match('/^image\/(gif|jpe?g|png|tiff|bmp|svg)/', $inline_object->mimetype)
+ ) {
+ $this->attachments[] = $inline_object;
+ }
}
// add replace array to each content part