mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-21 06:33:18 +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:
@@ -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