From 99054fbef96708054b737bbeaad0dcd0b23bb6e0 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 23 Dec 2017 21:38:36 +0100 Subject: [PATCH] * net/eww.el (eww): Handle URLs without host part. --- lisp/net/eww.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index bff592c3fe2..fcd2b98797a 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -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))) - (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)))) + (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))))) (plist-put eww-data :url url) (plist-put eww-data :title "") (eww-update-header-line-format) -- 2.39.5