[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 1f591ca: Further IDNA tweaks
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 1f591ca: Further IDNA tweaks |
Date: |
Mon, 28 Dec 2015 01:57:48 +0000 |
branch: master
commit 1f591ca64f2409b4c44d7ff239f95bcfa1a568aa
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Further IDNA tweaks
(idna-encode-string): Make idna-encode-string safe for
non-ASCII use.
---
lisp/net/idna.el | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lisp/net/idna.el b/lisp/net/idna.el
index f34fb9c..dfaf711 100644
--- a/lisp/net/idna.el
+++ b/lisp/net/idna.el
@@ -33,7 +33,9 @@
(let ((ascii (seq-filter (lambda (char)
(< char 128))
string)))
- (concat "xn--" ascii "-" (idna-encode-complex (length ascii) string))))
+ (if (= (length ascii) (length string))
+ string
+ (concat "xn--" ascii "-" (idna-encode-complex (length ascii) string)))))
(defconst idna-initial-n 128)
(defconst idna-initial-bias 72)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 1f591ca: Further IDNA tweaks,
Lars Ingebrigtsen <=