Open jowlo opened 3 years ago
What if a such a wrong folded line contains a colon in its content? Maybe we need something like "is not a property line".
I think it might also be fine to just ignore those lines instead so the LOCATION
would be just "This is some".
What if a such a wrong folded line contains a colon in its content? Maybe we need something like "is not a property line".
Yes, but i think that is pretty hard to define. That's why the standard has defined lines with starting spaces as continuation lines.
My rationale here was just that when we try to parse every line (after joining together those that start with a whitespace) we throw an error if there is no colon. Everything that does not have a colon is a "not a property line" effectively. So as of now we cannot deal with this at all and to be a bit more lenient, we could just add that info to whatever field comes before that. We could also just ignore those lines.
In case there is a colon, we will not be able to parse those and i think we will
It seems that Outlook is handling it the same way. I am a bit divided between following the standard and making it easier for users to import their calendars...
The iCal format is a mess, but as a user i still want to import my calendars that i exported from my previous calendar application.
Context
The issue with this file is that continuation lines do not start with a whitespace, see the
LOCATION
property below. This is not according to standard, but a lot of other calendar applications accept this anyways (incl outlook).I propose to join a line to the previous one if the line does not contain a colon, because we will not be able to parse them anyway since we are expecting
PROP:VALUE
format. This would be the best place to do so imohttps://github.com/tutao/tutanota/blob/ffe396613752e7697e3232592372f39bfb0e5aa9/src/calendar/export/CalendarParser.js#L210-L213
I think it would be better to have slightly ugly imports than to not have imports at all in this case.