emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/webjump.el,v


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/lisp/net/webjump.el,v
Date: Wed, 25 Jul 2007 00:54:25 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   07/07/25 00:54:25

Index: webjump.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/net/webjump.el,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- webjump.el  28 May 2007 07:41:53 -0000      1.15
+++ webjump.el  25 Jul 2007 00:54:25 -0000      1.16
@@ -451,13 +451,11 @@
 
 (defun webjump-url-encode (str)
   (mapconcat '(lambda (c)
-               (cond ((= c 32) "+")
-                     ((or (and (>= c ?a) (<= c ?z))
-                          (and (>= c ?A) (<= c ?Z))
-                          (and (>= c ?0) (<= c ?9)))
-                      (char-to-string c))
-                     (t (upcase (format "%%%02x" c)))))
-            str
+                (let ((s (char-to-string c)))
+                  (cond ((string= s " ") "+")
+                        ((string-match "[a-zA-Z_.-/]" s) s)
+                        (t (upcase (format "%%%02x" c))))))
+             (encode-coding-string str 'utf-8)
             ""))
 
 (defun webjump-url-fix (url)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]