From 8351f0beabdeb2e4b637eed40718fdc0db54ac60 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 17 Sep 2020 09:34:22 +0530 Subject: [PATCH] Fix #2970 --- kitty/window.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/window.py b/kitty/window.py index a7b88b651..ddd14679d 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -495,7 +495,7 @@ class Window: if hyperlink_id: if not self.opts.allow_hyperlinks: return - from urllib.parse import unquote, urlparse + from urllib.parse import unquote, urlparse, urlunparse try: purl = urlparse(url) except Exception: @@ -511,6 +511,7 @@ class Window: if remote_hostname and remote_hostname != hostname and remote_hostname != 'localhost': self.handle_remote_file(purl.netloc, unquote(purl.path)) return + url = urlunparse(purl._replace(netloc='')) if self.opts.allow_hyperlinks & 0b10: from kittens.tui.operations import styled get_boss()._run_kitten('ask', ['--type=choices', '--message', _(