* net/eww.el (eww): Handle URLs without host part.

This commit is contained in:
Andreas Schwab 2017-12-23 21:38:36 +01:00
parent de89c0b641
commit 99054fbef9

View file

@ -261,9 +261,10 @@ word(s) will be searched for via `eww-search-prefix'."
;; IDNA characters. If not, transform to punycode to indicate that
;; there may be funny business going on.
(let ((parsed (url-generic-parse-url url)))
(when (url-host parsed)
(unless (puny-highly-restrictive-domain-p (url-host parsed))
(setf (url-host parsed) (puny-encode-domain (url-host parsed)))
(setq url (url-recreate-url parsed))))
(setq url (url-recreate-url parsed)))))
(plist-put eww-data :url url)
(plist-put eww-data :title "")
(eww-update-header-line-format)