Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser error on multiline properties #581

Open
ray007 opened this issue Mar 28, 2023 · 4 comments
Open

parser error on multiline properties #581

ray007 opened this issue Mar 28, 2023 · 4 comments

Comments

@ray007
Copy link

ray007 commented Mar 28, 2023

In ICS data, property values can span multiple lines, with all but the first starting with whitespace.
This seems to only work with standard blank (\x20) and tab (\t), but not with non-breaking space (\xa0).

@leftmostcat
Copy link
Collaborator

leftmostcat commented Mar 28, 2023

Per §3.1 of RFC 5545, those are the only two characters allowed:

That is, a long line can be split between any two characters by inserting a CRLF immediately followed by a single linear white-space character (i.e., SPACE or HTAB).

That said, that doesn't stop implementers from using other characters. Is this a situation you've encountered in the wild? If so, do you happen to know what program created the ICS file in question?

@ray007
Copy link
Author

ray007 commented Mar 29, 2023

No idea which program was used to create the ICS file, it was a public holiday calendar I used for testing.
Will check if the data maybe got corrupted somewhere on the way...

@ray007
Copy link
Author

ray007 commented Mar 29, 2023

While being more permissive with the whitespace char might be nice, seems your implementation is spec compliant.
Guess I'll deal with it with an extra "decode" step.

@ray007 ray007 closed this as completed Mar 29, 2023
@leftmostcat
Copy link
Collaborator

I think this could be implemented without breaking other inputs. Postel's law applies here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants