Adblocker seems to ignore attribute filters
- Dominant language
- Rust
- Stars
- 2.8k
- Forks
- 250
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 6
Description
I have these rules for [Yandex Market](https://market.yandex.ru):
```adblock
market.yandex.ru##div["data-apiary-widget-name"*="@monetize/"]
market.yandex.ru##div["data-apiary-widget-name"="@marketfront/MadvHeaderPromo"]
```
These are straight from [Adblock Plus syntax](https://help.adblockplus.org/hc/en-us/articles/360062733293-How-to-write-filters#elemhide_attributes) which adblocker claims to support.
Still, this div is not blocked/hidden:

I tried using `:matches-attr()` from [uBlock's Wiki](https://github.com/gorhill/ublock/wiki/Procedural-cosmetic-filters#subjectmatches-attrarg):
```adblock
market.yandex.ru##div:matches-attr("data-apiary-widget-name"="/@monetize\/[^\s]+/")
market.yandex.ru##div:matches-attr("data-apiary-widget-name"="@marketfront/MadvHeaderPromo")
```
These still don't hide anything.
While with uBlock Origin and even Adblock Plus it works like a charm.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported filters on market.yandex.ru and compare the attribute-filter and :matches-attr() cases described in the issue. Trace the adblock-rust filter matching entry point to determine why these selectors do not hide the reported div; done means the supplied rules block it without breaking existing filter behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100