pull/17/merge
Ludovic Marcotte 2014-01-31 15:04:49 -05:00
parent ddd7be4333
commit bcb0764b19
1 changed files with 13 additions and 1 deletions

View File

@ -35,6 +35,8 @@
@"http://www.ietf.org/internet-drafts/draft-dawson-vcard-xml-dtd-03.txt"
#endif
static NSArray *privilegedTagNames = nil;
@implementation NGCardsSaxHandler
- (id) init
@ -42,6 +44,12 @@
if ((self = [super init]))
topGroupClass = nil;
if (!privilegedTagNames)
{
privilegedTagNames = [NSArray arrayWithObjects: @"ADR", @"N", @"RRULE", nil];
RETAIN(privilegedTagNames);
}
return self;
}
@ -211,7 +219,11 @@
free (content);
content = NULL;
// NSLog (@"content: '%@'", s);
contentValues = [s vCardSubvalues];
if ([privilegedTagNames containsObject: [currentElement tag]])
contentValues = [s vCardSubvalues];
else
contentValues = [NSMutableDictionary dictionaryWithObject: [NSMutableArray arrayWithObject: [NSMutableArray arrayWithObject: s]]
forKey: @""];
}
else
contentValues = nil;