]> spindle.queued.net Git - midori/commitdiff
Skip '+' sign in adblock rules
authorAlexander Butenko <a.butenka@gmail.com>
Wed, 30 Jun 2010 15:48:37 +0000 (11:48 -0400)
committerChristian Dywan <christian@twotoasts.de>
Wed, 30 Jun 2010 19:09:55 +0000 (21:09 +0200)
extensions/adblock.c

index 4623d595407b378d8e81b665a5a8654b748d6d91..372d13adf093ede558a786b6770bfd8e5a121119 100644 (file)
@@ -1059,6 +1059,8 @@ adblock_fixup_regexp (gchar* src)
         case '^':
             g_string_append (str, "");
             break;
+        case '+':
+            break;
         default:
             g_string_append_printf (str,"%c", *src);
             break;
@@ -1407,6 +1409,7 @@ test_adblock_parse (void)
     g_assert (!adblock_parse_line ("##"));
     g_assert (!adblock_parse_line ("["));
 
+    g_assert_cmpstr (adblock_parse_line ("+advert/"), ==, "advert/");
     g_assert_cmpstr (adblock_parse_line ("*foo"), ==, "foo");
     g_assert_cmpstr (adblock_parse_line ("f*oo"), ==, "f.*oo");
     g_assert_cmpstr (adblock_parse_line ("?foo"), ==, "\\?foo");