summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-08-19 02:35:38 +0200
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-08-19 03:18:29 +0200
commit718c6d4c33b24723ee6861e017e269662f193b96 (patch)
treee9b51b5050ee96c28c38a914674ec67f6a7ce7ea /src
parentAdd a special matcher for ad block filters for host name (diff)
downloadrekonq-718c6d4c33b24723ee6861e017e269662f193b96.tar.xz
Skip the hiding rules specific to domains
The rules to hide elements for a specific domains were interpreted as regular RegExp rules, which grows the list of filter to test. Those rules are not working with the current implementation, we should just skip them for efficiency.
Diffstat (limited to 'src')
-rw-r--r--src/adblock/adblockmanager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp
index 600dc5ce..8deb0bcd 100644
--- a/src/adblock/adblockmanager.cpp
+++ b/src/adblock/adblockmanager.cpp
@@ -150,6 +150,10 @@ void AdBlockManager::loadRules(const QStringList &rules)
continue;
}
+ // TODO implement domain-specific hiding
+ if (stringRule.contains(QL1S("##")))
+ continue;
+
if (_hostBlackList.tryAddFilter(stringRule))
continue;
AdBlockRule rule(stringRule);