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

Optionally URL-encode parentheses #115

Open
tomayac opened this issue Jan 20, 2022 · 6 comments
Open

Optionally URL-encode parentheses #115

tomayac opened this issue Jan 20, 2022 · 6 comments
Assignees

Comments

@tomayac
Copy link
Member

tomayac commented Jan 20, 2022

(Migrated from GoogleChromeLabs/link-to-text-fragment#51.)

The Chrome extension created this link for me:
https://wiki.eclipse.org/Tycho/Reference_Card#:~:text=include%20source%20bundles)-,target%20runtime%20environment,-Specify%20which%20environments

Do you see the closing parenthesis ")" in the URL? That is a problem, just like an opening parenthesis, if you want to use that URL in a markdown documentlink, because the format is [My description](https://my.url.org/foo/bar). Now when using the URL in a link directly here on GitHub, it looks like this:

My description-,target%20runtime%20environment,-Specify%20which%20environments)

If I manually URL-encode the closing parenthesis as %29, the link looks OK:

My description

So please, enable the user to specify a list of characters which should be URL-encoded by default.

@tomayac
Copy link
Member Author

tomayac commented Jan 20, 2022

(CC: @kriegaex)

@tomayac
Copy link
Member Author

tomayac commented Mar 21, 2022

There's a user report in GoogleChromeLabs/link-to-text-fragment#55 about spaces that need to manually be encoded to %20. Maybe this issue can track both problems, parentheses and spaces.

@kriegaex
Copy link

Well, ideally it would address all characters which need to be properly encoded.

@herrkaefer
Copy link

Report of another character that's not encoded and can invalidate the generated link: the dash -. The default extension encodes it as %2D.

@tomayac
Copy link
Member Author

tomayac commented Apr 11, 2022

Another case of this came up in GoogleChromeLabs/link-to-text-fragment#59.

@tomayac
Copy link
Member Author

tomayac commented May 15, 2023

More issues related to URL-encoding in GoogleChromeLabs/link-to-text-fragment#87.

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

No branches or pull requests

4 participants