LowTechFilter
LowTechFilter copied to clipboard
[removeparam] [uBO] ๐ request to update filter (google.com)
what does FutaFilter
do currently?
https://github.com/FutaGuard/FutaFilter/blob/26bf4163819aea77e9d54a820d689e1075764951/removeparam.txt#L41 $removeparam=/utm_campaign/i
filter may remove too many characters from few Google URL-s path.
supposed to be
N/A, exclude clear google links may reduce the effectiveness of the list.
reason
steps to reproduce:
-
Sometime on Google Maps is promoted now opened local shops (with daily needed food) or restaurants
-
In this small pop-up we have found these links:
https://www.google.com/url?q=https://www.google.com/maps/search/otwarty%2Bsklep%2Bspo%C5%BCywczy%3Futm_source%3Dgoogle%26utm_medium%3Dhppromo%26utm_campaign%3Dretail_m&source=hpp
-
Then
$removeparam=/utm_campaign/i
remove main of paramertq=
:q=https://www.google.com/maps/search/otwarty%2Bsklep%2Bspo%C5%BCywczy%3Futm_source%3Dgoogle%26utm_medium%3Dhppromo%26utm_campaign%3Dretail_m
-
so we have error about "this url redirect to invalid page".
I can't reproduce with AdGuard.
Step:
- Open
https://www.google.com/url?q=https://www.google.com/maps/search/otwarty%2Bsklep%2Bspo%C5%BCywczy%3Futm_source%3Dgoogle%26utm_medium%3Dhppromo%26utm_campaign%3Dretail_m&source=hpp
- AdGuard do remove parameter
- Finally redirect to
https://www.google.com/maps/search/otwarty+sklep+spo%C5%BCywczy
@gorhill
The filter is not crafted properly. When using regex-based removeparam
token, more attention needs to be paid to the regex so as to avoid false positive. The filter should really be:
*$removeparam=/^utm_campaign=/i
This will avoid false positives.
Ideally there is no need to a regex, this will work just as well:
*$removeparam=utm_campaign
Thanks @gorhill for the suggestion โบ๏ธ however FutaFilter list was built for AdGuard at first, so I was not clear about uBO's syntax. But I will try to make it compatible with other adblocker next time ๐
AdGuard will also support the same syntax/semantic, this was the result of discussions to implement removeparam
the same way in both blockers, see https://github.com/uBlockOrigin/uBlock-issues/issues/1356#issuecomment-735896202.
For uBo 1.36.0+ only:
@@||www.google.*/url?q=https://www.google.*/maps/*utm_campaign$removeparam
See these: https://github.com/uBlockOrigin/uBlock-issues/issues/1626