+2005-05-31 Helge Hess <helge.hess@skyrix.com>
+
+ * NGVCardSaxHandler.m: ensure that types are always uppercase, improved
+ check for DUPs (v4.5.46)
+
2005-05-16 Marcus Mueller <znek@mulle-kybernetik.com>
* NGiCal.xcode: reorganized ordering of headers/classes
v = [_attrs valueAtIndex:i];
if ([n hasSuffix:@".type"] || [n isEqualToString:@"TYPE"]) {
- if (![self->types containsObject:v])
- [self->types addObjectsFromArray:[v componentsSeparatedByString:@" "]];
+ /*
+ Note: types cannot be separated by comma! Its indeed always a space,eg
+ "work pref voice"
+ If you find commas, usually the vCard is broken.
+ */
+ NSEnumerator *e;
+ NSString *k;
+
+ e = [[v componentsSeparatedByString:@" "] objectEnumerator];
+ while ((k = [e nextObject]) != nil) {
+ k = [k uppercaseString];
+ if ([self->types containsObject:k]) continue;
+ [self->types addObject:k];
+ }
}
else
[self->args setObject:v forKey:n];