From a1b00b76383452099d65e8597f8c9037d0e14f00 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 3 Oct 2015 10:14:58 -0400 Subject: [PATCH] Updated Static filter syntax (markdown) --- Static-filter-syntax.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Static-filter-syntax.md b/Static-filter-syntax.md index 188031f..6fb6c6d 100644 --- a/Static-filter-syntax.md +++ b/Static-filter-syntax.md @@ -16,6 +16,18 @@ uBlock Origin extends Adblock Plus filter syntax. #### Network filters +uBlock Origin can also parse HOSTS file-like resources. However, this creates an ambiguity with ABP filter syntax, which is pattern-based. For exemple, consider the following filter entry: + + example.com + +ABP filter syntax dictates that this is interpreted as "block network requests which URL contains `example.com` at any position". However if the entry comes from a HOSTS file, the interpretation must be "block network requests to the site `example.com`". + +So in uBlock Origin, any entry which can be read as a valid hostname, will be assumed to be a HOSTS file entry. If ever you want such filter to be parsed as an ABP filter, just add a wildcard at the end: + + example.com* + +##### Network filters options + `document` for _block_ filters: This will cause web pages which match the filter to be subjected to [strict blocking](https://github.com/gorhill/uBlock/wiki/Quick-guide:-popup-user-interface#no-strict-blocking).