1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-24 04:36:34 +01:00

AdBlockManager: Parse also invalid abp: urls

Some sites (like filterlists.com) serves invalid abp urls:

    abp:subscribe?location=https%3A%2F%2Ffoo.com&title=AakList

Make sure the "amp;title" key will be parsed as title.

BUG: 397716
FIXED-IN: 3.1.0
This commit is contained in:
David Rosca 2018-12-24 20:39:55 +01:00
parent fe45d36cda
commit 47f2a1697c
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -172,9 +172,9 @@ bool AdBlockManager::addSubscriptionFromUrl(const QUrl &url)
for (int i = 0; i < queryItems.count(); ++i) {
QPair<QString, QString> pair = queryItems.at(i);
if (pair.first == QL1S("location"))
if (pair.first.endsWith(QL1S("location")))
subscriptionUrl = pair.second;
else if (pair.first == QL1S("title"))
else if (pair.first.endsWith(QL1S("title")))
subscriptionTitle = pair.second;
}