Skip to content

Commit

Permalink
Ignoring rules
Browse files Browse the repository at this point in the history
  • Loading branch information
vbagirov committed Aug 15, 2023
1 parent 0818cc1 commit 52dbe39
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions docs/general/ad-filtering/create-own-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,59 @@ AdGuard Safari and AdGuard for iOS do not fully support regular expressions beca

:::

### Ignoring rules {#rules-ignore}

Rules that match an arbitrarily large number of URLs are considered incorrect and will be ignored. This can happen when the rule doesn't contain a mask, or when the mask matches any URL with a certain protocol.

This rule will be ignored:

```text
|http://$replace=/a/b/
```

This limitation can be circumvented by using a `/.*/` regular expression inside the mask.

This rule will not be ignored:

```text
(/.*/$replace=/a/b/)
```

**Exceptions**

This rule validation is not applied in following cases:

- The rule contains [`$domain`](#domain-modifier) modifier that points to a specific domain list.

These rules will not be ignored:

```text
$domain=example.com,script
$domain=example.*,script
```

This rule will be ignored:

```text
$domain=~example.com,script
```

- The rule contains [`$app`](#app-modifier) modifier that points to a specific app list.

These rule will not be ignored:

```text
$app=curl,document
```

This rule will be ignored:

```text
$domain=~curl,document
```

- The rule contains one or more modificators from among [`$cookie`](#cookie-modifier), [`$removeparam`](#removeparam-modifier), [`$removeheader`](#removeheader-modifier), [`$stealth`](#stealth-modifier).

### Wildcard support for TLD (top-level domains) {#wildcard-for-tld}

Wildcard characters are supported for TLDs of the domains in patterns of [cosmetic](#cosmetic-rules), [HTML filtering](#html-filtering-rules) and [JavaScript](#javascript-rules) rules.
Expand Down

0 comments on commit 52dbe39

Please sign in to comment.