-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support $match-case
option for adblock filters
#28194
Labels
enhancement
feature/shields/adblock
Blocking ads & trackers with Shields
OS/Android
Fixes related to Android browser functionality
OS/Desktop
QA Pass - Android ARM
QA Pass-Linux
QA Pass-macOS
QA Pass-Win64
QA/Test-All-Platforms
QA/Yes
release-notes/include
Milestone
Comments
25 tasks
Verification
Confirmed second script (
|
before fix (1.48.158) | step 5-6 | step 8a | step 8b |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Verification
|
Brave | 1.49.96 Chromium: 110.0.5481.77 (Official Build) beta (x86_64) |
---|---|
Revision | 65ed616c6e8ee3fe0ad64fe83796c020644d42af-refs/branch-heads/5481@{#839} |
OS | macOS Version 11.7.3 (Build 20G1116) |
Steps:
- installed
1.49.96
- launched Brave
- opened a new-tab page
- opened
brave://settings/shields/filters
- added the following in the
Create custom filters
text box
/^https?:\/\/cdn\.[a-z]{4,6}\.xyz\/test\.json/$3p,match-case
- clicked
Save changes
- visit
https://example.com/
in a new tab - open the DevTools panel, and paste each of the following lines separately into the console:
await fetch('https://cdn.abcdef.xyz/test.json');
await fetch('https://cdn.abcdef.xyz/TEST.JSON');
Confirmed second script (await fetch('https://cdn.abcdef.xyz/TEST.JSON';)
produced net::ERR_NAME_NOT_RESOLVED
error.
steps 5-6 | step 8a | step 8b |
---|---|---|
![]() |
![]() |
![]() |
Verified with
Verified test plan from #28194 (comment). Reproduced the issue using 1.48.171.
|
Verification PASSED on Verified test plan from #28194 (comment). Reproduced the issue using 1.48.171.
|
This was referenced Mar 10, 2023
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
enhancement
feature/shields/adblock
Blocking ads & trackers with Shields
OS/Android
Fixes related to Android browser functionality
OS/Desktop
QA Pass - Android ARM
QA Pass-Linux
QA Pass-macOS
QA Pass-Win64
QA/Test-All-Platforms
QA/Yes
release-notes/include
Brave's default lists include several
$match-case
regex filters; the option should be supported by Brave Shields for better compatibility.Test Plan:
Add the following to
brave://settings/shields/filters
:Visit https://example.com, open the DevTools panel, and paste each of the following lines into the console:
Without the fix, both will produce a
net::ERR_BLOCKED_BY_CLIENT
error.With the fix, the second script should instead produce a
net::ERR_NAME_NOT_RESOLVED
error.The text was updated successfully, but these errors were encountered: