AdguardTeam / AdguardTeam/FiltersCompiler

`^script:has-text` is not converted to AdGuard syntax

Open
#166 0 comments 0 reactions 1 assignee Claimed by @maximtop View on GitHub
bug feature request Priority: P4
Dominant language
JavaScript
Stars
64
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Related to [##^script:has-text](https://github.com/AdguardTeam/FiltersCompiler/issues/60)
Updated AdGuard `$$` syntax:
https://adguard.com/kb/general/ad-filtering/create-own-filters/#html-filtering-rules

For example, AdGuard for Windows converts uBO's HTML filtering rule
`forbes.com##^script:has-text(scriptTag)`
to AdGuard's
`forbes.com$$script[tag-content="scriptTag"][max-length="262144"]`
But conversion is not applied to unblocking rules
`forbes.com#@#^script:has-text(scriptTag)`

This causes the error during compiling filters:
`Error: Invalid selector: '^script:has-text(responseText)' -- Error: unable to select by '^script' — '^script' is not a valid selector in rule: mail.walla.co.il#@#^script:has-text(responseText)`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.