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

Add support for $removeparam filter syntax #23927

Closed
UjCbFwtBayFM opened this issue Jul 7, 2022 · 5 comments · Fixed by brave/brave-core#15943
Closed

Add support for $removeparam filter syntax #23927

UjCbFwtBayFM opened this issue Jul 7, 2022 · 5 comments · Fixed by brave/brave-core#15943
Assignees

Comments

@UjCbFwtBayFM
Copy link

Description

Several adblockers added the ability to remove URL parameters over the last few years, like uBlock Origin through the $removeparam filter. Allows to remove tracking/unnecessary URL parameters.
Brave support is currently hardcoded to very select few parameters, thus making it impossible to use any list using this filter.

Steps to Reproduce

  1. None

Brave version (brave://version info)

Brave 1.40.113 Chromium: 103.0.5060.114 (Official Build) (64-bit)
Revision a1c2360c5b02a6d4d6ab33796ad8a268a6128226-refs/branch-heads/5060@{#1124}
OS Windows 10 Version 21H1 (Build 19043.1766)
@ryanbr
Copy link

ryanbr commented Jul 8, 2022

We can close this, we already have a ticket for this. brave/adblock-rust#166 No eta, but we are aware of it. cc: @antonok-edm

@antonok-edm
Copy link
Collaborator

Reopening this, since support is incoming in adblock-rust. We'll use this issue to track the brave-core integration.

@kjozwiak
Copy link
Member

kjozwiak commented Dec 9, 2022

The above requires 1.47.122 or higher for 1.47.x verification 👍

@stephendonner
Copy link

stephendonner commented Dec 11, 2022

Verified PASSED using

Brave 1.47.123 Chromium: 108.0.5359.99 (Official Build) beta (x86_64)
Revision 410951fc34bb4b2cbf182231f9f779efaafaf682-refs/branch-heads/5359_71@{#9}
OS macOS Version 13.1 (Build 22C65)

Used the testplan at brave/brave-core#15943 (comment)

Steps:

  1. saved HTML testcase as index.html
  2. started server via python3 -m http.server
  3. added filter rule of localhost:8000^$document,removeparam=test to brave://settings/shields/filters
  4. clicked Saved changes
  5. loaded localhost:8000/index.html
  6. clicked on each of the 3 links

Confirmed the expected values for all 3 links were correct, as per the test plan

index.html brave://settings/shields/filters ?test2=false (empty) ?test2=false
Screenshot 2022-12-11 at 11 38 14 AM Screenshot 2022-12-11 at 11 38 22 AM Screenshot 2022-12-11 at 11 38 43 AM Screenshot 2022-12-11 at 11 38 47 AM Screenshot 2022-12-11 at 11 38 52 AM

@Uni-verse Uni-verse added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Jan 9, 2023
@Uni-verse
Copy link
Contributor

Uni-verse commented Jan 9, 2023

Verified on Samsung Galaxy S21 using version:

Brave	1.47.167 Chromium: 109.0.5414.80 (Official Build) (64-bit) 
Revision	0f69b168d36a06cace4365e9f029fa987afa5633-refs/branch-heads/5414@{#1178}
OS	Android 12; Build/SP1A.210812.016

Test Page - https://uni-verse.github.io/adblock-tests/removeparam.html

screenshot-1673364196479

Custom filter: ||uni-verse.github.io^$removeparam=test

screenshot-1673364540942

Test Plan:

  1. Visit test page and click on each of the links and observe the path in the url bar for each one.
  • Verified filter rules are applied to remove test from the query param in the URL
/?test2=false /?test=true /?test=true&test2=false
screenshot-1673364208385 screenshot-1673364226932 screenshot-1673364238533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants