]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug in shr-urlify introduced in previous patch
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 13 Apr 2018 16:35:07 +0000 (18:35 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 13 Apr 2018 16:35:07 +0000 (18:35 +0200)
* lisp/net/shr.el (shr-urlify): Not all URLs have domains, so
check for that before doing IDNA.

lisp/net/shr.el

index 7b8c841d9dcae9fd53368d52ddd1bcc4688cc8ba..5ffaf153c38717248fb0a8996ad9cadd9d074328 100644 (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)