sindresorhus / normalize-url

Normalize a URL
MIT License
837 stars 123 forks source link

How do I get non stripped urls from given text #128

Closed mifas closed 3 years ago

mifas commented 3 years ago

When I pass below URL, these characters are removed !@#$. But I'm expecting those characters should present. Is there I can make this changE?

getUrls(`https://abc.yahoo.co.jp!@#$`) -> `https://abc.yahoo.co.jp`
sindresorhus commented 3 years ago

Those characters are not valid in that place. After the TLD, there can be a /, ?, or #. Normalize URLs does its job correctly here.