tasti / react-linkify

React component to parse links (urls, emails, etc.) in text into clickable links
http://tasti.github.io/react-linkify/
MIT License
553 stars 106 forks source link

Can't identity the links with whitespaces #118

Open anishlp7 opened 1 year ago

anishlp7 commented 1 year ago

Hi React-Linkify Team,

I'm facing an issue, Since I'm having a string with links, but the links has some whitespaces, so Linkify treats the link after the whitespace as a string, instead of link.

Example:

Hello, Welcome to my website, https://example.portolfio.com/abc/example portfolio.png which is the example portfolio image

in this, React Linkify considers https://example.portolfio.com/abc/example as the link and leave the portfolio.png as a normal string.

Is there a way to fix this?

MDUK0001 commented 1 year ago

That's not a valid URL, you need to URL encode your filename e.g. https://example.portolfio.com/abc/example%20portfolio.png