]> spindle.queued.net Git - midori/commitdiff
Ignore rules with subdocument property
authorAlexander Butenko <a.butenka@gmail.com>
Thu, 23 Jun 2011 02:27:39 +0000 (22:27 -0400)
committerChristian Dywan <christian@twotoasts.de>
Fri, 24 Jun 2011 19:26:05 +0000 (21:26 +0200)
extensions/adblock.c

index 72ef3001a538ef0dac11519ca4a76a1614b09f87..eeebb1624f24cbeebc1e08ab04359d7773ac24cb 100644 (file)
@@ -1191,6 +1191,14 @@ adblock_add_url_pattern (gchar* prefix,
         opts = g_strdup_printf ("t=%s,r=%s", type, patt);
     }
 
+    if (g_regex_match_simple ("subdocument", opts,
+                              G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY))
+    {
+        g_free (patt);
+        g_free (opts);
+        return NULL;
+    }
+
     format_patt = adblock_fixup_regexp (prefix, patt);
 
     adblock_debug ("got: %s opts %s", format_patt, opts);