summaryrefslogtreecommitdiff
path: root/src/adblock/adblockruletextmatchimpl.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-02-21 17:06:25 +0100
committerAndrea Diamantini <adjam7@gmail.com>2013-02-21 17:06:25 +0100
commitd57c29564826da0c7f668d7f1b8524bddef9bc6b (patch)
tree82aeb42a1b48cf26e398c00db608df3b39a3fffc /src/adblock/adblockruletextmatchimpl.cpp
parentAdd overwrite flag to file copy ad filters list to not bother users (diff)
downloadrekonq-d57c29564826da0c7f668d7f1b8524bddef9bc6b.tar.xz
Triple check against stupid rules like "*" or "##"
CCBUG: 315002
Diffstat (limited to 'src/adblock/adblockruletextmatchimpl.cpp')
-rw-r--r--src/adblock/adblockruletextmatchimpl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/adblock/adblockruletextmatchimpl.cpp b/src/adblock/adblockruletextmatchimpl.cpp
index fd901e9c..1938cb92 100644
--- a/src/adblock/adblockruletextmatchimpl.cpp
+++ b/src/adblock/adblockruletextmatchimpl.cpp
@@ -3,6 +3,7 @@
* This file is a part of the rekonq project
*
* Copyright (C) 2010-2011 by Benjamin Poulain <ikipou at gmail dot com>
+* Copyright (C) 2010-2013 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
@@ -48,6 +49,9 @@ bool AdBlockRuleTextMatchImpl::match(const QNetworkRequest &request, const QStri
{
Q_UNUSED(request);
Q_UNUSED(encodedUrl);
+ if (m_textToMatch.isEmpty())
+ return false;
+
// Case sensitive compare is faster, but would be incorrect with encodedUrl since
// we do want case insensitive.
// What we do is work on a lowercase version of m_textToMatch, and compare to the lowercase