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

Fix * and $ not being linkified #36

Merged
merged 2 commits into from
Sep 29, 2020
Merged

Fix * and $ not being linkified #36

merged 2 commits into from
Sep 29, 2020

Conversation

rocktimsaikia
Copy link
Contributor

fixes #33
Fixes the issue of asterisks not being linkified properly.
Added test for it too.

//@sindresorhus

@sindresorhus
Copy link
Owner

@rocktimsaikia
Copy link
Contributor Author

@sindresorhus Ah I see. So doesn't that mean all the reserved characters should be percentage-encoded? Cause currently, none of the reserved characters are getting url-encoded.

@sindresorhus
Copy link
Owner

Hmm, seems to be conflicting info about this. The RFC actually allows unencoded *: https://stackoverflow.com/a/6533595/64949

@sindresorhus
Copy link
Owner

sindresorhus commented Sep 29, 2020

Can you make sure all the mentioned characters here are supported unencoded?

Thus, only alphanumerics, the special characters $-_.+!*'(), and reserved characters used for their reserved purposes may be used unencoded within a URL.

@rocktimsaikia
Copy link
Contributor Author

@sindresorhus Yes those characters are supported unencoded as stated on RFC. But still It does seem to have some conflicting views on this. May be cause most of us are not actually informed about this. So I guess we can just leave it as unencoded and mention about this information on the Readme properly so that others can know about it too.

@sindresorhus
Copy link
Owner

So I guess we can just leave it as unencoded and mention about this information on the Readme properly so that others can know about it too.

I'm not sure what you're saying here, but I'm saying I'm ok with this PR if you ensure all the mentioned characters are supported.

@rocktimsaikia
Copy link
Contributor Author

rocktimsaikia commented Sep 29, 2020

@sindresorhus Ah sorry I misunderstood it. I checked and the dollar sign $ was not supported too. I added it as well along with a test for it too.

@sindresorhus sindresorhus changed the title fix asterisks not being linkified correctly Fix * and $ not being linkified Sep 29, 2020
@sindresorhus sindresorhus merged commit 842bf80 into sindresorhus:master Sep 29, 2020
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.

Asterisks in the hash aren't linkified correctly
2 participants