mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
AdBlockRule: Correctly disable third-party option
This commit is contained in:
parent
4efbc54cac
commit
6b02cd4cab
@ -224,10 +224,12 @@ bool AdBlockRule::networkMatch(const QWebEngineUrlRequestInfo &request, const QS
|
||||
return false;
|
||||
}
|
||||
|
||||
#if QTWEBENGINE_DISABLED
|
||||
// Check third-party restriction
|
||||
if (hasOption(ThirdPartyOption) && !matchThirdParty(request)) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check object restrictions
|
||||
if (hasOption(ObjectOption) && !matchObject(request)) {
|
||||
@ -434,11 +436,13 @@ void AdBlockRule::parseFilter()
|
||||
m_caseSensitivity = Qt::CaseSensitive;
|
||||
++handledOptions;
|
||||
}
|
||||
#if QTWEBENGINE_DISABLED
|
||||
else if (option.endsWith(QL1S("third-party"))) {
|
||||
setOption(ThirdPartyOption);
|
||||
setException(ThirdPartyOption, option.startsWith(QL1C('~')));
|
||||
++handledOptions;
|
||||
}
|
||||
#endif
|
||||
else if (option.endsWith(QL1S("object"))) {
|
||||
setOption(ObjectOption);
|
||||
setException(ObjectOption, option.startsWith(QL1C('~')));
|
||||
|
Loading…
Reference in New Issue
Block a user