mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-14 17:58:51 +00:00
Monotone-Parent: 07598ed25ba62374768b8640ed2ee37f0095224b
Monotone-Revision: e339a3442f42acdf4909a6baec00b5327ae53cb3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-08-26T15:29:05 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2010-08-26 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MailerUI/UIxMailEditor.m (_emailFromIdentity:): the "from"
|
||||
field is handled in SOGoDraftObject, therefore we don't need to
|
||||
modify it here, especially since this will alterate the display.
|
||||
|
||||
* Tests/Unit/TestNGMimeAddressHeaderFieldGenerator.m: new test
|
||||
module for NGMimeAddressHeaderFieldGenerator.
|
||||
|
||||
|
||||
@@ -195,27 +195,11 @@ static NSArray *infoKeys = nil;
|
||||
|
||||
- (NSString *) _emailFromIdentity: (NSDictionary *) identity
|
||||
{
|
||||
static NSCharacterSet *specialCharacters = nil;
|
||||
NSString *fullName, *format;
|
||||
|
||||
if (!specialCharacters)
|
||||
{
|
||||
/* This list is taken from rfc 822 sect. 3.3. LEXICAL TOKENS: */
|
||||
specialCharacters = [NSCharacterSet
|
||||
characterSetWithCharactersInString:
|
||||
@"()<>@,;:\\\".[]"];
|
||||
[specialCharacters retain];
|
||||
}
|
||||
|
||||
fullName = [identity objectForKey: @"fullName"];
|
||||
if ([fullName length])
|
||||
{
|
||||
if ([fullName rangeOfCharacterFromSet: specialCharacters].location
|
||||
== NSNotFound)
|
||||
format = @"%{fullName} <%{email}>";
|
||||
else
|
||||
format = @"\"%{fullName}\" <%{email}>";
|
||||
}
|
||||
format = @"%{fullName} <%{email}>";
|
||||
else
|
||||
format = @"%{email}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user