1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-21 18:23:59 +00:00

Fix punycode short circuit logic

* puny.el (puny-encode-domain): Fix short-circuit logic.
This commit is contained in:
Lars Ingebrigtsen 2015-12-28 19:13:51 +01:00
parent 91ef47353d
commit 0e99ccb321

View File

@ -34,7 +34,7 @@
For instance, \"fśf.org\" => \"xn--ff-2sa.org\"."
;; The vast majority of domain names are not IDNA domain names, so
;; add a check first to avoid doing unnecessary work.
(if (string-match "\\'[[:ascii:]]*\\'" domain)
(if (string-match "\\'[[:ascii:]]+\\'" domain)
domain
(mapconcat 'puny-encode-string (split-string domain "[.]") ".")))