Fix download of HTML body parts

pull/246/head
Francis Lachapelle 2018-12-10 16:05:12 -05:00
parent 1ba1be9e31
commit c96a99ae69
2 changed files with 10 additions and 3 deletions

1
NEWS
View File

@ -12,6 +12,7 @@ Bug fixes
- [web] fixed handling of duplicate recipients (#4597)
- [web] fixed folder export when XSRF validation is enabled (#4502)
- [web] don't encode filename extension when exporting folders
- [web] fixed download of HTML body parts
- [core] don't always fetch the sorting columns
- [eas] strip '<>' from bodyId and when forwarding mails
- [eas] fix search on for Outlook application (#4605 and #4607)

View File

@ -35,6 +35,7 @@
#import <NGImap4/NGImap4Connection.h>
#import <NGMail/NGMimeMessage.h>
#import <NGMime/NGMimeMultipartBody.h>
#import <NGMime/NGMimeType.h>
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
#import <SoObjects/SOGo/NSObject+Utilities.h>
@ -265,10 +266,15 @@ static BOOL debugOn = NO;
if (!obj)
{
/* lookup body part */
if ([self isBodyPartKey: _key])
obj = [self lookupImap4BodyPartKey: _key inContext: _ctx];
if ([self isBodyPartKey: _key]) {
obj = [self lookupImap4BodyPartKey: _key inContext: _ctx];
}
else if ([_key isEqualToString: @"asAttachment"])
[self setAsAttachment];
{
// Don't try to render the part; rewrite object to a simple body part.
obj = [SOGoMailBodyPart objectWithName: [self nameInContainer] inContainer: [self container]];
[obj setAsAttachment];
}
/* should check whether such a filename exist in the attached names */
if (!obj)
obj = self;