[Freeassociation-devel] Problems with un-escaped characters in TZID
Brad Hards
bradh at frogmouth.net
Tue Dec 22 23:43:22 PST 2009
Hi,
I work with the OpenChange project (http://www.openchange.org), which provides
(amongst other things) a tool that does conversion from Exchange calendars to
ICalendar. We use libical for that.
One of our users reported that newlines in timezones (TZID) aren't properly
escaped. Here is the original report:
http://trac.openchange.org/ticket/218
It does indeed appear to be a problem with libical. Attached is a small patch
for the libical regression tests that shows the problem. Here is the output I
see with the current (trunk, revision 982) libical.
########## Test TZID escaping (43) ##########
DTSTART;VALUE=DATE;TZID=Timezone
with a newline:20090126
not ok 641 - test encoding of 'Timezone\nwith a newline'
# test failed: ""
# at: regression.c:1270
# got: DTSTART;VALUE=DATE;TZID=Timezone
with a newline:20090126
# expected: DTSTART;VALUE=DATE,TZID=Timezone\nwith a newline:20090126
I'm not very familiar with libical (just a user of the library), but it looks
like maybe icalparameter_as_ical_string_r() needs to handle the CTLs?
Thoughts? Suggestions?
Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ical-tzid-escape-test-2009-12-23.patch
Type: text/x-patch
Size: 2392 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libical-devel/attachments/20091223/db10bacf/attachment.bin>
More information about the libical-devel
mailing list