nfrasser/linkifyjs

Special Characters at end of url are not recognized as part of it

Closed this issue · 2 comments

lepult commented

Special Characters at the end of a URL aren't recognised as a part of it, even though they should be. If a letter is added after the special character, it is recognised as part of the url.

Example:

linkify.find('test.com/?test=)'); // returns object with value === "test.com/?test=". Expected closing bracket at end of it.
linkify.find('test.com/?test=)a'); // returns object with value === "test.com/?test=)a"

any updates?

Hi @lepult and @CHOYSEN, apologies for the delay. This is unfortunately the intended behaviour. Specifically, URLs cannot end in a closing parentheses. You'll notice that Github's autolink works similarly: http://test.com/?test=)

I will accept pull requests if anyone wants to implementing a workable solution to this, but for now I'm marking this as not planned.