Firefox now supports clean URLs with the new "Copy link without site tracking" option

https://lemmy.world/post/8834978

Firefox now supports clean URLs with the new "Copy link without site tracking" option - Lemmy.World

No need to remove the URL tracking parameters manually. 🥳 Firefox copy link without site tracking [https://www.mozilla.org/media/img/firefox/releasenotes/note-images/120_relnote_copylink2.png]

Does anyone know where the source code for this is?

Remove everything after the question mark? Aka the Query String.

I’m not sure what else Firefox can do

Blanket-removing the query string would break many real links, so I’d imagine it’s more nuanced than that.
I really hope they’re not sending the URL anywhere…
There’s various well-known tracking parameters that can be stripped. Stripping all query parameters would break a lot of sites, like anything in the vein of example.com/site.php?id=123
My c++ is pretty rusty, but I hopped through the changelogs. I think this is the source for it here hg.mozilla.org/…/URLQueryStringStripper.cpp
mozilla-central @ tip / toolkit/components/antitracking/URLQueryStringStripper.cpp

Content of toolkit/components/antitracking/URLQueryStringStripper.cpp at revision cb2d73366c3402dd65e1703b9f4139efa4d0e24c in mozilla-central

I don't know the relevant programming languages so I don't know what to search for, but generally, if you want to find something in the Firefox source code, supposedly https://searchfox.org is a great way to do that.
Searchfox