From: Alexander Butenko Date: Tue, 26 Jan 2010 21:03:47 +0000 (+0100) Subject: Prevent styles with a "'" character from breaking adblock X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b42792caf38b4c632f1423889caee610eccecee;p=midori Prevent styles with a "'" character from breaking adblock --- diff --git a/extensions/adblock.c b/extensions/adblock.c index 25504197..c7af950e 100644 --- a/extensions/adblock.c +++ b/extensions/adblock.c @@ -1078,9 +1078,10 @@ adblock_frame_add (gchar* line) (void)*line++; (void)*line++; - if (strchr (line, ':') + if (strchr (line, '\'') + || (strchr (line, ':') && !g_regex_match_simple (".*\\[.*:.*\\].*", line, - G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY)) + G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY))) { return; } @@ -1097,6 +1098,7 @@ adblock_frame_add_private (const gchar* line, data = g_strsplit (line, sep, 2); if (!(data[1] && *data[1]) + || strchr (data[1], '\'') || (strchr (data[1], ':') && !g_regex_match_simple (".*\\[.*:.*\\].*", data[1], G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY)))