parent
b8df16cd8c
commit
cb960fae02
3
NEWS
3
NEWS
|
@ -4,6 +4,9 @@
|
|||
Enhancements
|
||||
- [web] updated CKEditor to version 4.6.0
|
||||
|
||||
Bug fixes
|
||||
- [web] restore attributes when rewriting base64-encoded img tags (#3814)
|
||||
|
||||
3.2.2 (2016-11-23)
|
||||
------------------
|
||||
|
||||
|
|
|
@ -289,7 +289,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;
|
||||
|
@ -345,7 +345,20 @@
|
|||
|
||||
[images addObject: bodyPart];
|
||||
|
||||
[result appendFormat: @"<img src=\"cid:%@\" type=\"%@\"/>", uniqueId, mimeType];
|
||||
[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 appendString: @"/>"];
|
||||
}
|
||||
}
|
||||
else if (voidTags)
|
||||
|
|
Loading…
Reference in New Issue