From c4e0db1427e20e7ae6573dc6db2191032232b2f7 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 9 Jun 2009 20:00:28 +0000 Subject: [PATCH] Monotone-Parent: ec8493cddd76f24d59a41d1da4982d89ecab0001 Monotone-Revision: 527c04f1467ba6a6e11ff578bd608677271dd0fb Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-06-09T20:00:28 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 10 ++++++++++ SoObjects/Appointments/SOGoAppointmentFolder.m | 14 ++++++++++---- SoObjects/SOGo/SOGoWebDAVValue.m | 8 ++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) 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