summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-02-03 18:59:59 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-02-03 18:59:59 +0000
commite21173f0772e332cd6c41432a4aa2aa4b4f15024 (patch)
tree336d577eed0cc153fe31c672245e780ed59b200b /roundcubemail/program/include
parente336b9ace146a739d9ca42273889be990efd19d4 (diff)
- Fix handling of non-image attachments in multipart/related messages (#1487750)
git-svn-id: https://svn.roundcube.net/trunk@4487 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/rcube_message.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_message.php b/roundcubemail/program/include/rcube_message.php
index af91b8001..ec034db69 100644
--- a/roundcubemail/program/include/rcube_message.php
+++ b/roundcubemail/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