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

TEXT is not escaped #134

Closed
terijaki opened this issue Jan 5, 2025 · 0 comments · Fixed by #136
Closed

TEXT is not escaped #134

terijaki opened this issue Jan 5, 2025 · 0 comments · Fixed by #136

Comments

@terijaki
Copy link
Contributor

terijaki commented Jan 5, 2025

I've noticed that TEXT data is not escaped.

This is causing particular problems with location when filled with a comma value. Calendars will only take the string up to the comma.
e.g. LOCATION:Alt-Moabit 140, 10557 Berlin, Germany will result in the calendar showing only Alt-Moabit 140

Reference: https://icalendar.org/iCalendar-RFC-5545/3-3-11-text.html

One simple solution would be to escape these characters when they do not have a leading slash: .replace(/([^\\])([\\,\n;\r])/g, "$1\\$2")

@timheerwagen timheerwagen linked a pull request Jan 6, 2025 that will close this issue
timheerwagen added a commit that referenced this issue Jan 6, 2025
Escape commas and semicolons in value type of TEXT #134
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants