From 47f2a1697ca81224822b89f152ecf4b7a16a2b69 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 24 Dec 2018 20:39:55 +0100 Subject: [PATCH] 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 --- src/lib/adblock/adblockmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/adblock/adblockmanager.cpp b/src/lib/adblock/adblockmanager.cpp index 5de7ecb51..5b856b687 100644 --- a/src/lib/adblock/adblockmanager.cpp +++ b/src/lib/adblock/adblockmanager.cpp @@ -172,9 +172,9 @@ bool AdBlockManager::addSubscriptionFromUrl(const QUrl &url) for (int i = 0; i < queryItems.count(); ++i) { QPair 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; }