Assume localhost is always local

Required by the spec
This commit is contained in:
Kovid Goyal 2020-09-15 16:19:27 +05:30
parent d60020f5ac
commit 58f78afc2e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -508,7 +508,7 @@ class Window:
except Exception:
hostname = ''
remote_hostname = purl.netloc.partition(':')[0]
if remote_hostname and remote_hostname != hostname:
if remote_hostname and remote_hostname != hostname and remote_hostname != 'localhost':
self.handle_remote_file(purl.netloc, unquote(purl.path))
return
if self.opts.allow_hyperlinks & 0b10: