gkucmierz / social-links

Validate & sanitize social links
https://npmjs.com/package/social-links
MIT License
28 stars 14 forks source link

Allow @ in Instagram #14

Closed Katreque closed 4 years ago

Katreque commented 4 years ago

Is it possible to allow Instagram user with @?

Sem título

gkucmierz commented 4 years ago

Why?

Instagram links don't work with @

Check this example: https://www.instagram.com/bitcoin - correct https://www.instagram.com/@bitcoin - not correct

Katreque commented 4 years ago

That's true, however, as user mentions on Instagram uses @, some users refers to profiles with @.

It could be valid and the sanitized url redirect to the valid form:

Instagram: @test isValid: True sanitizedUrl: https://www.instagram.com/test

gkucmierz commented 4 years ago

I get it. You mean profileId alone. I fixed it in v1.3.1 patch:

https://www.npmjs.com/package/social-links/v/1.3.1