Prevent styles with a "'" character from breaking adblock
This commit is contained in:
parent
d8dceb657d
commit
7b42792caf
1 changed files with 4 additions and 2 deletions
|
@ -1078,9 +1078,10 @@ adblock_frame_add (gchar* line)
|
||||||
|
|
||||||
(void)*line++;
|
(void)*line++;
|
||||||
(void)*line++;
|
(void)*line++;
|
||||||
if (strchr (line, ':')
|
if (strchr (line, '\'')
|
||||||
|
|| (strchr (line, ':')
|
||||||
&& !g_regex_match_simple (".*\\[.*:.*\\].*", line,
|
&& !g_regex_match_simple (".*\\[.*:.*\\].*", line,
|
||||||
G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY))
|
G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY)))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1097,6 +1098,7 @@ adblock_frame_add_private (const gchar* line,
|
||||||
data = g_strsplit (line, sep, 2);
|
data = g_strsplit (line, sep, 2);
|
||||||
|
|
||||||
if (!(data[1] && *data[1])
|
if (!(data[1] && *data[1])
|
||||||
|
|| strchr (data[1], '\'')
|
||||||
|| (strchr (data[1], ':')
|
|| (strchr (data[1], ':')
|
||||||
&& !g_regex_match_simple (".*\\[.*:.*\\].*", data[1],
|
&& !g_regex_match_simple (".*\\[.*:.*\\].*", data[1],
|
||||||
G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY)))
|
G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY)))
|
||||||
|
|
Loading…
Reference in a new issue