diff --git a/ChangeLog b/ChangeLog index dd68a1070..1f0436238 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-06-09 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoAppointmentFolder.m + (-freebusyResponseForRecipient:withUser:andCalendarData:): expose + the calendar-data as as !CDATA element. + + * SoObjects/SOGo/SOGoWebDAVValue.m + (-asWebDavStringWithNamespaces): new overriden method to enable + the passing of unescapable strings. + 2009-06-09 Francis Lachapelle * SoObjects/Appointments/SOGoAppointmentFolder.m diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 0c9ed4312..f2c3eafcb 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -62,6 +62,7 @@ #import #import #import +#import #import "iCalEntityObject+SOGo.h" #import "SOGoAppointmentObject.h" @@ -2014,7 +2015,8 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir { NSDictionary *response; NSMutableArray *content; - NSString *calendarCData; + SOGoWebDAVValue *cdata; + NSString *escapedData; content = [NSMutableArray new]; @@ -2023,9 +2025,13 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir { [content addObject: davElementWithContent (@"request-status", XMLNS_CALDAV, @"2.0;Success")]; - calendarCData = [NSString stringWithFormat: @"", calendarData]; - [content addObject: [davElementWithContent (@"calendar-data", XMLNS_CALDAV, - calendarCData) asWebDAVValue]]; + escapedData = [[NSString stringWithFormat: @"", + calendarData] + stringByEscapingXMLString]; + cdata = [SOGoWebDAVValue valueForObject: escapedData + attributes: nil]; + [content addObject: davElementWithContent (@"calendar-data", XMLNS_CALDAV, + cdata)]; } else [content addObject: diff --git a/SoObjects/SOGo/SOGoWebDAVValue.m b/SoObjects/SOGo/SOGoWebDAVValue.m index f1a5a5fa7..31c471f71 100644 --- a/SoObjects/SOGo/SOGoWebDAVValue.m +++ b/SoObjects/SOGo/SOGoWebDAVValue.m @@ -24,6 +24,8 @@ #import "SOGoWebDAVValue.h" +@class NSMutableDictionary; + @implementation SOGoWebDAVValue : SoWebDAVValue - (NSString *) stringForTag: (NSString *) _key @@ -34,4 +36,10 @@ return object; } +/* maybe a bit hackish... the mechanism should be reviewed a little bit */ +- (NSString *) asWebDavStringWithNamespaces: (NSMutableDictionary *) namespaces +{ + return object; +} + @end