Fix #2970
This commit is contained in:
parent
c26808c59e
commit
8351f0beab
1 changed files with 2 additions and 1 deletions
|
|
@ -495,7 +495,7 @@ def open_url(self, url: str, hyperlink_id: int) -> None:
|
|||
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 @@ def open_url(self, url: str, hyperlink_id: int) -> None:
|
|||
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', _(
|
||||
|
|
|
|||
Loading…
Reference in a new issue