mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-21 18:23:59 +00:00
(webjump-url-encode): Fix for non-ASCII characters.
This commit is contained in:
parent
d7e69846bb
commit
80f462b754
@ -1,3 +1,8 @@
|
||||
2007-07-25 William Xu <william.xwl@gmail.com> (tiny change)
|
||||
|
||||
* net/webjump.el (webjump-url-encode): Fix for non-ASCII
|
||||
characters.
|
||||
|
||||
2007-07-24 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* dired.el (dired-mode-map): Bind wdired-change-to-wdired-mode to
|
||||
|
@ -451,14 +451,12 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke
|
||||
|
||||
(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)
|
||||
(if (webjump-null-or-blank-string-p url)
|
||||
|
Loading…
Reference in New Issue
Block a user