gkucmierz / social-links

Validate & sanitize social links

Home Page:https://npmjs.com/package/social-links

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`socialLinks.sanitize` misformats valid Youtube urls (inserts `@` in the url)

AndrwM opened this issue · comments

Hey all, thanks much for this great utility.

In using socialLinks.sanitize for our implementation:

  • Given a url of https://www.youtube.com/channel/UCBTKd-zHSdr8POH-Y7LyPWg
  • socialLinks.sanitize will format the url as https://www.youtube.com/channel/@UCBTKd-zHSdr8POH-Y7LyPWg
  • This behavior can be replicated in the demo site: https://gkucmierz.github.io/social-links-app/

Demo site preview

Andrew McIntee Screencap 2023-04-25 at 13 28 20@2x


This was ultimately not a dealbreaker for us, we were able to use an alternative strategy in our particular implementation. However I wanted to raise this with y'all for visibility.

Appreciate the efforts, all the best~

You are trying to sanitize channel link.
I think channels are different things than profiles. And these two things should be served separately.
Right now there is no profile for channels. If you need it you can do PR with profile 'youtubeChannels'.
I will merge it.