parent
b8df16cd8c
commit
cb960fae02
3
NEWS
3
NEWS
|
@ -4,6 +4,9 @@
|
||||||
Enhancements
|
Enhancements
|
||||||
- [web] updated CKEditor to version 4.6.0
|
- [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)
|
3.2.2 (2016-11-23)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@
|
||||||
//
|
//
|
||||||
if ([value length] > 5 && [[value substringToIndex: 5] caseInsensitiveCompare: @"data:"] == NSOrderedSame)
|
if ([value length] > 5 && [[value substringToIndex: 5] caseInsensitiveCompare: @"data:"] == NSOrderedSame)
|
||||||
{
|
{
|
||||||
NSString *uniqueId, *mimeType, *encoding;
|
NSString *uniqueId, *mimeType, *encoding, *attrName;
|
||||||
NGMimeBodyPart *bodyPart;
|
NGMimeBodyPart *bodyPart;
|
||||||
NGMutableHashMap *map;
|
NGMutableHashMap *map;
|
||||||
NSData *data;
|
NSData *data;
|
||||||
|
@ -344,8 +344,21 @@
|
||||||
[body release];
|
[body release];
|
||||||
|
|
||||||
[images addObject: bodyPart];
|
[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)
|
else if (voidTags)
|
||||||
|
|
Loading…
Reference in New Issue