Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support l.facebook.com/l.php? cleaning #1

Closed
chmac opened this issue Sep 5, 2021 · 2 comments
Closed

Support l.facebook.com/l.php? cleaning #1

chmac opened this issue Sep 5, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@chmac
Copy link

chmac commented Sep 5, 2021

Firstly, thanks for building this, it's exactly what I was hoping I wouldn't have to build myself!

Secondly, what about adding the option to copy & paste a link from Facebook and get back the real URL? I realise that right now that doesn't work.

Here's the URL format:

https://l.facebook.com/l.php?
u=URL_ENCODED_LINK_HERE
&h=TRACKING_PARAM
&__tn__=TRACKING_PARAM
&c[0]=TRACKING_PARAM

I guess a sensible strategy would be:

  • If the link host is l.facebook.com
  • Get the u parameter from the URL
  • decodeURIComponent() on u
  • Pass the result (which includes fbclid and other junk) through the current rules

I'd be happy to work on a PR if that's something you're open to. Just let me know.

@corbindavenport
Copy link
Owner

Random example link I found on Twitter, for testing purposes:

https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.forgottenbooks.com%2Fen%2Fdownload%2FThe_Chaldean_Account_of_Genesis_Containing_the_Description_of_the_1000324030.pdf%3Ffbclid%3DIwAR1XVx0MFOZMKhBt5kuDR4Yp0tIBDBHqIw4_50rBqUmUoyShQLjpGIv55eQ&h=AT2szQ7FsPEyZyFG-Hlj-vqwKSyDYZpyb2OogpxH-NfA-0RRLybei0MW8bhF60occeEonMOOE82tphNCXPvc_qbY5jLQSPVAmvrep7E2dCRxtnCFwu8EWjUiMTbfYYIftENm&__tn__=-UK*F&c[0]=AT2e0KMdyFyFrxBt68hvhLc7QD7gd2Lw6iZEFr6ECTmSqklTG3MHQWqhWsdyDJYuowum9Lwo57w6I9UllubuQCUe-vxxEy14-_5KYFFErJg2lcxZv4Uk3z3InYB5d07xBNPxZw458ZJXSs6hjuUZ7x3VauFXLZUdDt6N8kk7McaK450Ght08YYfA4lm30_-h2GBLBK6WuyLsHyIhyECtvjcJoTLkIQFK_6Ds5eBheAxnB0KgpzccLrRuK-52CyG3xWXD

@corbindavenport corbindavenport added the enhancement New feature or request label Nov 14, 2021
@corbindavenport
Copy link
Owner

This has been added to Link Cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants