mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-17 09:18:13 +00:00
1 parent
1ff24dddfc
commit
3711e7d123
2 files changed
+16
-3
No files matched your search
@@ -296,7 +296,7 @@
|
||||
//
|
||||
if ([value length] > 5 && [[value substringToIndex: 5] caseInsensitiveCompare: @"data:"] == NSOrderedSame)
|
||||
{
|
||||
NSString *uniqueId, *mimeType, *encoding;
|
||||
NSString *uniqueId, *mimeType, *encoding, *attrName;
|
||||
NGMimeBodyPart *bodyPart;
|
||||
NGMutableHashMap *map;
|
||||
NSData *data;
|
||||
@@ -351,8 +351,21 @@
|
||||
[body release];
|
||||
|
||||
[images addObject: bodyPart];
|
||||
|
||||
[result appendFormat: @"<img src=\"cid:%@\" type=\"%@\"", uniqueId, mimeType];
|
||||
|
||||
// Restore img attributes
|
||||
for (i = 0; i < [attributes count]; i++)
|
||||
{
|
||||
attrName = [[attributes rawNameAtIndex: i] lowercaseString];
|
||||
if (![attrName isEqualToString: @"src"] && ![attrName isEqualToString: @"type"])
|
||||
{
|
||||
value = [attributes valueAtIndex: i];
|
||||
[result appendFormat: @" %@=\"%@\"", attrName, value];
|
||||
}
|
||||
}
|
||||
|
||||
[result appendFormat: @"<img src=\"cid:%@\" type=\"%@\"/>", uniqueId, mimeType];
|
||||
[result appendString: @"/>"];
|
||||
}
|
||||
}
|
||||
else if (voidTags)
|
||||
|
||||
Reference in new issue
Block a user