Quoted TZIDs are incorrectly parsed
While the spec says that certain values MUST be quoted, and that other params containing commas, semicolons and colons MUST be quoted, it seems to be a bit silent on whether its allowed to quote other strings or not.
I happen to be using an example that contains DTSTART;TZID="Eastern" (where Eastern is defined in the VTIMEZONEs), the tzid part gets parsed as "tzid;"", and we lose the "Eastern" completely.
https://icalevents.com/2108-tzids-with-quotes-around-them/ <- not mine but it seems someone else came across the same thing
See also: https://www.rfc-editor.org/errata/eid5505
I think it should be allowed to quote other strings, or at least ical.js should understand that and unquote.
Related but just FYI, there is also rfc6868 for alternative ways to quote.
Agreed, maybe drop the special "might be a quoted multi-value" boolean flag, and check all values for surrounding quotes?
Oh interesting, I didn't check the code. If there is already a flag for it then there might have been a reason. I'll have to double check the rfc, and/or get some advice on the calsify list.
As far as I can see its currently only special casing the "items separated by commas" part of the spec.. ignoring anything that "might contain a comma, semi-colon or colon" (tho I may have missed something)
I believe this was due to various issues in parsing quoted parameters, not specific to TZID or timezones. There were a few issues fixed recently, and one more filed but not fixed. For the purpose of this issue I think we are good. I've tried the following:
let x = ICAL.parse('BEGIN:VCALENDAR\nBEGIN:VEVENT\nDTSTART;TZID="Eastern":20210101T010203\nEND:VEVENT\nEND:VCALENDAR');
let comp = new ICAL.Component(x);
console.log(JSON.stringify(comp.toJSON()));
And get this:
["vcalendar",[],[["vevent",[["dtstart",{"tzid":"Eastern"},"date-time","2021-01-01T01:02:03"]],[]]]]
If I missed something please reopen or file a new issue.