summaryrefslogtreecommitdiff
path: root/src/adblock.c
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2011-11-30 10:44:55 +0100
committerportix <portix@gmx.net>2011-11-30 10:44:55 +0100
commit7a4c47db7bd480a04cc4da7cd829a548de9d9772 (patch)
treee2cdb17176563a7f58604fd842b059122da4e3f0 /src/adblock.c
parent452d890acc1ae55390fa55cfbfec07b809225d79 (diff)
downloaddwb-7a4c47db7bd480a04cc4da7cd829a548de9d9772.zip
Also add rules with attribute ~AA_DOCUMENT to the simple rules array.
--HG-- branch : experimental
Diffstat (limited to 'src/adblock.c')
-rw-r--r--src/adblock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/adblock.c b/src/adblock.c
index 88a939a6..a88a8ca3 100644
--- a/src/adblock.c
+++ b/src/adblock.c
@@ -58,6 +58,7 @@ typedef enum _AdblockAttribute {
/* inverse */
} AdblockAttribute;
#define AA_FRAME (AA_SUBDOCUMENT | (AA_SUBDOCUMENT<<ADBLOCK_INVERSE))
+#define AA_MAINFRAME (AA_DOCUMENT | (AA_DOCUMENT<<ADBLOCK_INVERSE))
typedef struct _AdblockRule {
GRegex *pattern;
@@ -755,7 +756,7 @@ adblock_rule_parse(char *pattern) {
adrule->pattern = rule;
adrule->options = option;
adrule->domains = domains;
- if (!(attributes & ~(AA_DOCUMENT | AA_FRAME))) {
+ if (!(attributes & ~(AA_MAINFRAME | AA_FRAME))) {
if (exception)
g_ptr_array_add(_simple_exceptions, adrule);
else