SufficientlySecure / calendar-import-export

Import/export your Android calendars as ics files without using the Google cloud
https://www.schuermann.eu/android/
GNU General Public License v3.0
80 stars 27 forks source link

Imported bug: Import of multi-line description fields #2

Closed dschuermann closed 9 years ago

dschuermann commented 11 years ago

What steps will reproduce the problem?

  1. Attempt to import an ICS with a multi-line description field

What is the expected output? What do you see instead?

Multi-line description fields have a space in the first position of the second and subsequent lines. For example:

DESCRIPTION:Trip:\nJUL 16-DESTINATION\nDeparts Jul 16\, 20 11 8:25am Arrives Jul 16\, 2011 12:55pm

The second line starts with a space and should be recognized as a continuation of the DESCRIPTION field. The resulting description should read:

Trip: JUL 16-DESTINATION Departs Jul 16, 2011 8:25am Arrives Jul 16, 2011 12:55pm

Instead, the following error message is printed:

Error iCal file could not be parsed Error at line xx: illegal property [ 11 6]

This seems to indicate that the importer is treating the continuation line as a new field.

What version of the product are you using? On what operating system? Version 1.5 on Android 2.3

Please provide any additional information below.


Found this: http://sourceforge.net/tracker/index.php?func=detail&aid=1755577&group_id=107024&atid=646395

I verified that the ICS file from which I pulled an excerpt above uses LF solely, not CRLF as specified in RFC 2445. So shame on them.

The above iCal4j bug was closed as 'rejected' but it also references a RELAXED_UNFOLDING compatibility hint that will accept LF-only line breaks. Is it possible to get that implemented, either as the default or as an option?

http://m2.modularity.net.au/projects/ical4j/apidocs/net/fortuna/ical4j/util/CompatibilityHints.html

dschuermann commented 9 years ago

fixed with https://github.com/dschuermann/ical-import-export/pull/18