markdown-it / linkify-it

Links recognition library with full unicode support
http://markdown-it.github.io/linkify-it/
MIT License
655 stars 63 forks source link

Matching URL's that contain spaces %20 #91

Closed Awethentique closed 2 years ago

Awethentique commented 4 years ago

Hi, Thanks for this awesome project.

I ran into an issue where If the link contains white space "%20", (I know right people should never be using white space in their URL's)

Then the link gets trimmed short and thus incorrect

for example using the encoded link: http://go%2Emsn%2Ecom/nl/133942%20Easp

it renders as (see screenshot attached) http://go or in my case after some adjustments and testing http://go.msn.com/nl/133942 Easp

Is there a temporary workaround or permanent solution for this to include %20 in the regex to match the whitespace? Screenshot 2020-08-05 at 14 54 13

puzrin commented 4 years ago

https://markdown-it.github.io/linkify-it/#t1=http%3A%2F%2Fgo%2Emsn%2Ecom%2Fnl%2F133942%20Easp%0A%0Ahttp%3A%2F%2Fgo.msn.com%2Fnl%2F133942%20Easp

Problem is not with encoded space, it's with encoded dots in domain name. Don't know is it valid or not. From the other hand, gihub recognises such pattern.

Could you describe, how you get such link?

puzrin commented 2 years ago

Closing as timed out. Feel free to add more info if still actual.