parent
589827a414
commit
e5d0b0b0ca
3
NEWS
3
NEWS
|
@ -4,6 +4,9 @@
|
|||
Enhancements
|
||||
- [web] show locale codes beside language names in Preferences module
|
||||
|
||||
Bug fixes
|
||||
- [web] fixed rendering of forwared HTML message with inline images (#3981)
|
||||
|
||||
3.2.5 (2017-01-10)
|
||||
------------------
|
||||
|
||||
|
|
|
@ -168,6 +168,7 @@
|
|||
viewer = [[[self context] mailRenderingContext] viewerForBodyInfo: info];
|
||||
[viewer setBodyInfo: info];
|
||||
[viewer setPartPath: [self childPartPath]];
|
||||
[viewer setAttachmentIds: attachmentIds];
|
||||
[renderedParts addObject: [viewer renderedPart]];
|
||||
}
|
||||
|
||||
|
|
|
@ -609,8 +609,7 @@ static NSData* _sanitizeContent(NSData *theData)
|
|||
value = [_attributes valueAtIndex: count];
|
||||
if ([value hasPrefix: @"cid:"])
|
||||
{
|
||||
cid = [NSString stringWithFormat: @"<%@>",
|
||||
[value substringFromIndex: 4]];
|
||||
cid = [value substringFromIndex: 4];
|
||||
value = [attachmentIds objectForKey: cid];
|
||||
skipAttribute = (value == nil);
|
||||
}
|
||||
|
@ -920,7 +919,7 @@ static NSData* _sanitizeContent(NSData *theData)
|
|||
createXMLReaderForMimeType: @"text/html"];
|
||||
|
||||
handler = [_UIxHTMLMailContentHandler new];
|
||||
[handler setAttachmentIds: [mail fetchFileAttachmentIds]];
|
||||
[handler setAttachmentIds: attachmentIds];
|
||||
|
||||
// We check if we got an unsupported charset. If so
|
||||
// we convert everything to UTF-16{LE,BE} so it passes
|
||||
|
@ -1047,7 +1046,7 @@ static NSData* _sanitizeContent(NSData *theData)
|
|||
encoding = @"us-ascii";
|
||||
|
||||
handler = [_UIxHTMLMailContentHandler new];
|
||||
[handler setAttachmentIds: [mail fetchFileAttachmentIds]];
|
||||
[handler setAttachmentIds: attachmentIds];
|
||||
|
||||
// We check if we got an unsupported charset. If so
|
||||
// we convert everything to UTF-16{LE,BE} so it passes
|
||||
|
|
|
@ -101,6 +101,7 @@
|
|||
viewer = [[[self context] mailRenderingContext] viewerForBodyInfo: info];
|
||||
[viewer setBodyInfo: info];
|
||||
[viewer setPartPath: [self childPartPath]];
|
||||
[viewer setAttachmentIds: attachmentIds];
|
||||
[renderedParts addObject: [viewer renderedPart]];
|
||||
}
|
||||
contentType = [NSString stringWithFormat: @"%@/%@",
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
@class NSArray;
|
||||
@class NSData;
|
||||
@class NSFormatter;
|
||||
@class NSMutableDictionary;
|
||||
|
||||
@class SOGoMailBodyPart;
|
||||
|
||||
|
@ -53,6 +54,7 @@
|
|||
NSArray *partPath;
|
||||
id bodyInfo;
|
||||
NSData *flatContent;
|
||||
NSDictionary *attachmentIds;
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
@ -66,6 +68,8 @@
|
|||
- (SOGoMailBodyPart *) clientPart;
|
||||
- (id) renderedPart;
|
||||
|
||||
- (void) setAttachmentIds: (NSDictionary *) newAttachmentIds;
|
||||
|
||||
- (NSData *)flatContent;
|
||||
- (NSData *)decodedFlatContent;
|
||||
- (NSString *)flatContentAsString;
|
||||
|
|
|
@ -42,6 +42,16 @@
|
|||
|
||||
@implementation UIxMailPartViewer
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
attachmentIds = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[flatContent release];
|
||||
|
@ -153,6 +163,11 @@
|
|||
nil];
|
||||
}
|
||||
|
||||
- (void) setAttachmentIds: (NSDictionary *) newAttachmentIds
|
||||
{
|
||||
attachmentIds = newAttachmentIds;
|
||||
}
|
||||
|
||||
- (NSData *) content
|
||||
{
|
||||
return [[self clientObject] fetchBLOB];
|
||||
|
|
|
@ -213,6 +213,20 @@ static NSString *mailETag = nil;
|
|||
viewer = [[context mailRenderingContext] viewerForBodyInfo: info];
|
||||
[viewer setBodyInfo: info];
|
||||
|
||||
NSMutableDictionary *attachmentIds;
|
||||
NSDictionary *attributes;
|
||||
unsigned int count, max;
|
||||
|
||||
max = [[self attachmentAttrs] count];
|
||||
attachmentIds = [NSMutableDictionary dictionaryWithCapacity: max];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
attributes = [[self attachmentAttrs] objectAtIndex: count];
|
||||
[attachmentIds setObject: [attributes objectForKey: @"url"]
|
||||
forKey: [attributes objectForKey: @"filename"]];
|
||||
}
|
||||
[viewer setAttachmentIds: attachmentIds];
|
||||
|
||||
return viewer;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue