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 paths containing unencoded ` followed by punctuation #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

timjamello
Copy link

@timjamello timjamello commented Mar 30, 2023

linkify-it currently supports apostrophes in the path, such as:

http://foo.com/blah_blah_I'm_king

However, there is no support for apostrophes followed by punctuation. This link is not found by linkify-it:

https://odysee.com/@EatMoreVegans:4/can-chefstemp-knock-thermoworks':0

What's happening here is that Odysee generates links using the first part of video titles. The title of the video linked above is "Can ChefsTemp Knock ThermoWorks' Thermapen One Off the Throne?". Their logic happens to end the path with the ' in the video title followed by punctuation.

Services that includes unencoded apostrophes in paths could follow that apostrophe with a number of different characters. Here's a Google Cache link that follows an unencoded ' with a (.

http://webcache.googleusercontent.com/search?q=cache:jkWRWOTPZXwJ:app.searchenabler.com/experiments/unsafe/%2520!%24%26'()*%2B,-.:%3B%253C%3D%253E%40%5B%255C%5D%255E_%2560%257B%257C%257D~+&cd=1&hl=en&ct=clnk

All three of these links are supported by my changes.

@timjamello timjamello marked this pull request as draft March 31, 2023 12:26
@timjamello timjamello marked this pull request as ready for review March 31, 2023 12:28
@timjamello timjamello marked this pull request as draft March 31, 2023 13:25
@timjamello timjamello force-pushed the support-unencoded-apostrophes branch from 7a39752 to 54247ad Compare April 1, 2023 17:49
@timjamello timjamello force-pushed the support-unencoded-apostrophes branch from 54247ad to a0b1cc5 Compare April 1, 2023 19:52
@timjamello timjamello marked this pull request as ready for review April 1, 2023 20:00
@timjamello timjamello changed the title Fix paths containing unencoded ` Fix paths containing unencoded ` followed by punctuation Apr 1, 2023
@timjamello
Copy link
Author

@rlidwka do you think you could take a look at this?

I noticed there is another PR in this repo that has gone stale, and I just want to make sure this one gets looked at.

@rlidwka
Copy link
Member

rlidwka commented May 8, 2023

@rlidwka do you think you could take a look at this?

I don't think so, since I didn't write this code, and I don't have publish permissions, so ask @puzrin.

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.

2 participants