1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

(browse-url-url-encode-chars): Use the right parameter name in the function body.

Reported by Johannes Weiner.
This commit is contained in:
Michaël Cadilhac 2007-09-19 11:22:03 +00:00
parent ba1cbad789
commit 59c4e1dad9
2 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2007-09-19 Micha,Ak(Bl Cadilhac <michael@cadilhac.name>
* net/browse-url.el (browse-url-url-encode-chars): Use the right
parameter name in the function body.
Reported by Johannes Weiner.
2007-09-19 Glenn Morris <rgm@gnu.org>
* net/socks.el (socks-open-network-stream): Signal an explicit

View File

@ -622,15 +622,15 @@ down (this *won't* always work)."
(defun browse-url-url-encode-chars (text chars)
"URL-encode the chars in TEXT that match CHARS.
CHARS is a regexp-like character alternative (e.g., \"[,)$]\")."
(let ((encoded-url (copy-sequence url))
(let ((encoded-text (copy-sequence text))
(s 0))
(while (setq s (string-match chars encoded-url s))
(setq encoded-url
(while (setq s (string-match chars encoded-text s))
(setq encoded-text
(replace-match (format "%%%x"
(string-to-char (match-string 0 encoded-url)))
t t encoded-url)
(string-to-char (match-string 0 encoded-text)))
t t encoded-text)
s (1+ s)))
encoded-url))
encoded-text))
(defun browse-url-encode-url (url)
"Escape annoying characters in URL.