client: fix relative paths

This commit is contained in:
2021-03-25 18:26:50 +01:00
parent f15ff38f69
commit 7476870acc
3 changed files with 9 additions and 3 deletions

View File

@@ -256,7 +256,7 @@ class HTMLDownloadHandler(DownloadHandler):
if img_src[0] == "/":
img_src = f"http://{self.cmd.host}{img_src}"
else:
img_src = os.path.join(base_url, img_src)
img_src = parser.absolute_url(base_url, img_src)
if parsed.hostname is None or parsed.hostname == self.cmd.host:
port = self.cmd.port