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

fixed an rendering issue for encoded urls #1173

Merged
merged 1 commit into from
Sep 9, 2017

Conversation

newgene
Copy link
Contributor

@newgene newgene commented Aug 11, 2017

If a url contains some special characters, like space or "<", it needs to be encoded in order to be recognized as a valid url. Adding a decoding step allows these urls to render correctly.

For example, a url

http://example.com?q=a AND b

will be rendered by autolinker as a wrong url which breaks before the first space.

we can use this encoded one to get around it

http://example.com?q=a%20AND%20b

The rendered url works, but does not decode the special characters.

This simple one line should fix this issue.

If a url contains some special characters, like space or "<", it needs to be encoded in order to be recognized as a valid url. Adding a decoding step allows these urls to render correctly.
@Golmote Golmote merged commit abc007f into PrismJS:gh-pages Sep 9, 2017
@Golmote
Copy link
Contributor

Golmote commented Sep 9, 2017

Thanks for contributing!

mAAdhaTTah pushed a commit that referenced this pull request Feb 11, 2019
This PR fixes #1721.

The problem was that the url-decoding introduced in #1173 was applied to all tokens.
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 this pull request may close these issues.

None yet

2 participants