summaryrefslogtreecommitdiff
path: root/qutebrowser/components
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-01-16 18:36:57 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-01-16 18:36:57 +0100
commit73f93008f6c8104dcb317b10bae2c6d156674b33 (patch)
tree37ccbacf5209314a24c85aaaf8cdd1aa81b7b8e2 /qutebrowser/components
parentce26e394c780260cdb0232e56174c91e71c38770 (diff)
downloadqutebrowser-73f93008f6c8104dcb317b10bae2c6d156674b33.tar.gz
qutebrowser-73f93008f6c8104dcb317b10bae2c6d156674b33.zip
brave adblocker: Disable on file:/// URLs
Fixes #6000
Diffstat (limited to 'qutebrowser/components')
-rw-r--r--qutebrowser/components/braveadblock.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/qutebrowser/components/braveadblock.py b/qutebrowser/components/braveadblock.py
index b00135660..ab8adbdae 100644
--- a/qutebrowser/components/braveadblock.py
+++ b/qutebrowser/components/braveadblock.py
@@ -141,7 +141,11 @@ class BraveAdBlocker:
# use of this adblocking module.
return False
- if first_party_url is None or not first_party_url.isValid():
+ if (
+ first_party_url is None
+ or not first_party_url.isValid()
+ or first_party_url.scheme() == "file"
+ ):
# FIXME: It seems that when `first_party_url` is None, every URL
# I try is blocked. This may have been a result of me incorrectly
# using the upstream library, or an upstream bug. For now we don't