summaryrefslogtreecommitdiff
path: root/qutebrowser/browser/shared.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/browser/shared.py')
-rw-r--r--qutebrowser/browser/shared.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/qutebrowser/browser/shared.py b/qutebrowser/browser/shared.py
index b5e0c90cb..0188a653f 100644
--- a/qutebrowser/browser/shared.py
+++ b/qutebrowser/browser/shared.py
@@ -70,7 +70,7 @@ def authentication_required(url, authenticator, abort_on):
else:
msg = '<b>{}</b> needs authentication'.format(
html.escape(url.toDisplayString()))
- urlstr = url.toString(QUrl.RemovePassword | QUrl.FullyEncoded)
+ urlstr = url.toString(QUrl.UrlFormattingOption.RemovePassword | QUrl.ComponentFormattingOption.FullyEncoded)
answer = message.ask(title="Authentication required", text=msg,
mode=usertypes.PromptMode.user_pwd,
abort_on=abort_on, url=urlstr)
@@ -93,7 +93,7 @@ def javascript_confirm(url, js_msg, abort_on):
msg = 'From <b>{}</b>:<br/>{}'.format(html.escape(url.toDisplayString()),
_format_msg(js_msg))
- urlstr = url.toString(QUrl.RemovePassword | QUrl.FullyEncoded)
+ urlstr = url.toString(QUrl.UrlFormattingOption.RemovePassword | QUrl.ComponentFormattingOption.FullyEncoded)
ans = message.ask('Javascript confirm', msg,
mode=usertypes.PromptMode.yesno,
abort_on=abort_on, url=urlstr)
@@ -110,7 +110,7 @@ def javascript_prompt(url, js_msg, default, abort_on):
msg = '<b>{}</b> asks:<br/>{}'.format(html.escape(url.toDisplayString()),
_format_msg(js_msg))
- urlstr = url.toString(QUrl.RemovePassword | QUrl.FullyEncoded)
+ urlstr = url.toString(QUrl.UrlFormattingOption.RemovePassword | QUrl.ComponentFormattingOption.FullyEncoded)
answer = message.ask('Javascript prompt', msg,
mode=usertypes.PromptMode.text,
default=default,
@@ -133,7 +133,7 @@ def javascript_alert(url, js_msg, abort_on):
msg = 'From <b>{}</b>:<br/>{}'.format(html.escape(url.toDisplayString()),
_format_msg(js_msg))
- urlstr = url.toString(QUrl.RemovePassword | QUrl.FullyEncoded)
+ urlstr = url.toString(QUrl.UrlFormattingOption.RemovePassword | QUrl.ComponentFormattingOption.FullyEncoded)
message.ask('Javascript alert', msg, mode=usertypes.PromptMode.alert,
abort_on=abort_on, url=urlstr)
@@ -185,7 +185,7 @@ def ignore_certificate_error(
first_party_url.isValid() and
not request_url.matches(
first_party_url,
- QUrl.RemoveScheme)) # type: ignore[arg-type]
+ QUrl.UrlFormattingOption.RemoveScheme)) # type: ignore[arg-type]
if conf == 'ask' or conf == 'ask-block-thirdparty' and not is_resource:
err_template = jinja.environment.from_string("""
@@ -216,7 +216,7 @@ def ignore_certificate_error(
)
urlstr = request_url.toString(
- QUrl.RemovePassword | QUrl.FullyEncoded) # type: ignore[arg-type]
+ QUrl.UrlFormattingOption.RemovePassword | QUrl.ComponentFormattingOption.FullyEncoded) # type: ignore[arg-type]
ignore = message.ask(title="Certificate error", text=msg,
mode=usertypes.PromptMode.yesno, default=False,
abort_on=abort_on, url=urlstr)
@@ -258,7 +258,7 @@ def feature_permission(url, option, msg, yes_action, no_action, abort_on,
config_val = config.instance.get(option, url=url)
if config_val == 'ask':
if url.isValid():
- urlstr = url.toString(QUrl.RemovePassword | QUrl.FullyEncoded)
+ urlstr = url.toString(QUrl.UrlFormattingOption.RemovePassword | QUrl.ComponentFormattingOption.FullyEncoded)
text = "Allow the website at <b>{}</b> to {}?".format(
html.escape(url.toDisplayString()), msg)
else: