Skip '+' sign in adblock rules
This commit is contained in:
parent
0d5a18b69c
commit
3d972f11e4
1 changed files with 3 additions and 0 deletions
|
@ -1059,6 +1059,8 @@ adblock_fixup_regexp (gchar* src)
|
||||||
case '^':
|
case '^':
|
||||||
g_string_append (str, "");
|
g_string_append (str, "");
|
||||||
break;
|
break;
|
||||||
|
case '+':
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
g_string_append_printf (str,"%c", *src);
|
g_string_append_printf (str,"%c", *src);
|
||||||
break;
|
break;
|
||||||
|
@ -1407,6 +1409,7 @@ test_adblock_parse (void)
|
||||||
g_assert (!adblock_parse_line ("##"));
|
g_assert (!adblock_parse_line ("##"));
|
||||||
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 ("*foo"), ==, "foo");
|
||||||
g_assert_cmpstr (adblock_parse_line ("f*oo"), ==, "f.*oo");
|
g_assert_cmpstr (adblock_parse_line ("f*oo"), ==, "f.*oo");
|
||||||
g_assert_cmpstr (adblock_parse_line ("?foo"), ==, "\\?foo");
|
g_assert_cmpstr (adblock_parse_line ("?foo"), ==, "\\?foo");
|
||||||
|
|
Loading…
Reference in a new issue