-
Notifications
You must be signed in to change notification settings - Fork 71
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
URL Reserved Characters in event details break ICS download links #84
Closed
Labels
bug
Something isn't working
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
Paul-Hebert
added a commit
to cloudfour/calendar-link
that referenced
this issue
Sep 6, 2019
The ICS generator creates a data URI Unescaped reserved chars like `#` and `?` can break the URL Escaping these sections resolves this. I changed the structure of the code to do this without double encoding. Also updates tests to match --- Fixes AnandChowdhary#84
Paul-Hebert
added a commit
to cloudfour/calendar-link
that referenced
this issue
Sep 6, 2019
The ICS generator creates a data URI. Unescaped reserved chars like `#` and `?` can break the URL Escaping these sections resolves this. I changed the structure of the code to do this without double encoding. Also updates tests to match. --- Fixes AnandChowdhary#84
Paul-Hebert
added a commit
to cloudfour/calendar-link
that referenced
this issue
Sep 6, 2019
The ICS generator creates a data URI. Unescaped reserved chars like `#` and `?` can break the URL Escaping these sections resolves this. I changed the structure of the code to do this without double encoding. Also updates tests to match. --- Fixes AnandChowdhary#84
Paul-Hebert
added a commit
to cloudfour/calendar-link
that referenced
this issue
Sep 6, 2019
The ICS generator creates a data URI. Unescaped reserved chars like `#` and `?` can break the URL Escaping these sections resolves this. I changed the structure of the code to do this without double encoding. Also updates tests to match. --- Fixes AnandChowdhary#84
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While using this library I had an event with a title that started with a hashtag. The
#
character is a reserved character in URLs signifying the beginning of a hash block.I ended up with a URL like this:
Since the browser interprets everything after the
#
as a URL hash, it ignores everything after it. This results in a URL like this:As you can see the majority of the data is stripped out. This results in a ICS file like this:
It would be nice if the library handled this by
encodeURIComponent
ing the user input, like this:I am guessing characters like
?
could cause similar problems.Special characters in
document.URL
could also potentially cause this issue.I'll try to find some time to open PR for this soon. 🙂
The text was updated successfully, but these errors were encountered: