Don't do pattern matching if link was matched by key
This commit is contained in:
parent
3db46d2297
commit
ac78646f83
1 changed files with 7 additions and 5 deletions
|
@ -678,8 +678,6 @@ static gboolean
|
||||||
adblock_is_matched (const gchar* req_uri,
|
adblock_is_matched (const gchar* req_uri,
|
||||||
const gchar* page_uri)
|
const gchar* page_uri)
|
||||||
{
|
{
|
||||||
gboolean foundbykey;
|
|
||||||
gboolean foundbypattern;
|
|
||||||
gchar* value;
|
gchar* value;
|
||||||
|
|
||||||
if ((value = g_hash_table_lookup (urlcache, req_uri)))
|
if ((value = g_hash_table_lookup (urlcache, req_uri)))
|
||||||
|
@ -690,9 +688,13 @@ adblock_is_matched (const gchar* req_uri,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
foundbykey = adblock_is_matched_by_key (req_uri, page_uri);
|
if (adblock_is_matched_by_key (req_uri, page_uri))
|
||||||
foundbypattern = adblock_is_matched_by_pattern (req_uri, page_uri);
|
{
|
||||||
if (foundbykey == TRUE || foundbypattern == TRUE)
|
g_hash_table_insert (urlcache, g_strdup (req_uri), g_strdup("1"));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adblock_is_matched_by_pattern (req_uri, page_uri))
|
||||||
{
|
{
|
||||||
g_hash_table_insert (urlcache, g_strdup (req_uri), g_strdup("1"));
|
g_hash_table_insert (urlcache, g_strdup (req_uri), g_strdup("1"));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue