User custom filter: CSS selector "has()" does not work
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- [O] I am running the latest version
- [O] I checked the documentation and found no answer
- [O] I checked to make sure that this issue has not already been filed
Issue Details
- AdGuard version:
- 2.6.0
- Browser:
- Samsung Internet
- Device model:
- Galaxy Note 10
- Operating system and version:
- Android 10
I am not sure this is a bug or a feature that is not yet adapted in the Adguard Content Blocker. CSS selector ':has(selector)' and '[-ext-has="selector"]' do not work in Adguard Content Blocker.
Those filters are listed in the Adguard custom filter guidelines. https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#extended-css-selectors-1
Expected Behavior
- Write own filter as follows: google.com##div:has(img[alt="Google"])
- Access google.
- Nothing shows (tested in PC browser with uBlock)
Actual Behavior
Filter with ":has()" selector is neglected. I've tried ##, #$#, #?#, :has(), and [-ext-has] but none of them worked.
Extended CSS, CSS and JS/Scriptlet rules cannot be used in Content Blocker.
Chrome 105 (I think Yandex updated Chromium engine enough) added support div:has(img[alt="Google"]), maybe use should be unlocked if app/plugin have something to disable use at all.
I guess we can allow these, but it should be done in https://github.com/AdguardTeam/FiltersCompiler