diff --git a/ChangeLog b/ChangeLog index 6d8378e87..370e8d23e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-03-11 Wolfgang Sourdeau + + * SoObjects/Contacts/SOGoContactFolders.m + (-setDavContactsCategories:): we need to handle the case where the + "category" element has more than one subnode, in particular when + xml entities are used. + 2011-03-11 Francis Lachapelle * UI/WebServerResources/ContactsUI.js (initContacts): don't define diff --git a/SoObjects/Contacts/SOGoContactFolders.m b/SoObjects/Contacts/SOGoContactFolders.m index 94e79a972..b208d0805 100644 --- a/SoObjects/Contacts/SOGoContactFolders.m +++ b/SoObjects/Contacts/SOGoContactFolders.m @@ -115,7 +115,7 @@ { SOGoUser *ownerUser; NSMutableArray *categories; - DOMElement *documentElement, *catNode, *textNode; + DOMElement *documentElement, *catNode; id document; id catNodes; NSUInteger count, max; @@ -133,14 +133,11 @@ { catNode = [catNodes objectAtIndex: count]; if ([catNode hasChildNodes]) - { - textNode = [[catNode childNodes] objectAtIndex: 0]; - [categories addObject: [textNode nodeValue]]; - } + [categories addObject: [catNode textValue]]; } } - NSLog (@"setting categories to : %@", categories); + // NSLog (@"setting categories to : %@", categories); ownerUser = [SOGoUser userWithLogin: owner]; ud = [ownerUser userDefaults]; [ud setContactsCategories: categories];