1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Fix bug in shr-urlify introduced in previous patch

* lisp/net/shr.el (shr-urlify): Not all URLs have domains, so
check for that before doing IDNA.
This commit is contained in:
Lars Ingebrigtsen 2018-04-13 18:35:07 +02:00
parent b1943e84bc
commit 712607b05a

View file

@ -1221,8 +1221,9 @@ START, and END. Note that START and END should be markers."
;; decoded version in the mouseover to let the
;; user know that there's something possibly
;; fishy.
(setf (url-host parsed)
(puny-encode-domain (url-host parsed)))
(when (url-host parsed)
(setf (url-host parsed)
(puny-encode-domain (url-host parsed))))
(setq iri (url-recreate-url parsed))
(if title
(format "%s (%s)" iri title)