AdguardBrowserExtension icon indicating copy to clipboard operation
AdguardBrowserExtension copied to clipboard

`$$tag:contains()` breaks sites

Open Alex-302 opened this issue 1 year ago • 4 comments

Please answer the following questions for yourself before submitting an issue

  • [X] Filters were updated before reproducing an issue
  • [X] I checked the knowledge base and found no answer
  • [X] I checked to make sure that this issue has not already been filed

AdGuard Extension version

4.3.46

Browser version

FireFox 126.0.1 (64-bit

OS version

Windows 10 x64

Ad Blocking

AdGuard Base filter

Issue Details

Steps to reproduce:

  1. Add carscoops.com$$script:contains(error-report.com) to user rules
  2. Open carscoops.com

Then disable this rule and check carscoops.com$$script[tag-content="error-report.com"]

Note: $$ rules can work only in Firefox.

Reported by @JobcenterTycoon at https://github.com/AdguardTeam/AdguardFilters/pull/180555#issuecomment-2142922776

Expected Behavior

Site works.

Actual Behavior

Site is hanging.

Alex-302 avatar May 31 '24 20:05 Alex-302

It's going to be fixed in v5.2: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2646

And we plan to add :contains a bit later: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/3150

scripthunter7 avatar Apr 08 '25 12:04 scripthunter7

@scripthunter7 @ameshkov How about revising the terms? This prevents blocking a popular script that bypasses ad blocking (A-S).

Alex-302 avatar Jun 06 '25 08:06 Alex-302

@scripthunter7 @ameshkov How about revising the terms? This prevents blocking a popular script that bypasses ad blocking (A-S).

what prevents?

this?

And we plan to add :contains a bit later: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/3150

maximtop avatar Jun 06 '25 17:06 maximtop

@maximtop Yes. Now we need to use $replace rules in FF instead of $$script:contains()

Alex-302 avatar Jun 18 '25 06:06 Alex-302

i've closed this issue, because its already fixed in https://github.com/AdguardTeam/tsurlfilter/commit/cb372ed830bbbb93edaffa7f8a5eb5570bca500c

(i mean, we fixed the breakage, and will add support for :contains a bit later, but we have a separate task for it)

scripthunter7 avatar Jul 21 '25 08:07 scripthunter7