-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Escape '#' except when fragment identifier #631
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URLs can end without a trailing slash and still have a #
fragment; for example, the link https://github.com/nodesource/distributions/blob/master/README.md#debian-and-ubuntu-based-distributions is perfectly valid but would not be escaped properly here.
@cassidyjames Hmm, OK thanks - I'll have to think again 🤔 |
These rules from w3.org may help:
|
# Conflicts fixed: # data/io.elementary.terminal.appdata.xml.in
Fixes #625
Rather than allowing all '#' characters in URLs this only allows those after the final
/
' which might be fragment identifiers.Open to suggestions for a more elegant method of doing this.
This PR fixes the URL given in the issue report. Suggestions for other corner cases to test welcome.
It would be good to add a test framework to CI test this (and maybe other functions) but that is left for another PR.