From 59c4e1dad9c1c7b325631d9a3f806909736a1406 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C3=ABl=20Cadilhac?= Date: Wed, 19 Sep 2007 11:22:03 +0000 Subject: [PATCH] (browse-url-url-encode-chars): Use the right parameter name in the function body. Reported by Johannes Weiner. --- lisp/ChangeLog | 6 ++++++ lisp/net/browse-url.el | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c0b26d26108..1c76b0e48f1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-09-19 Micha,Ak(Bl Cadilhac + + * 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 * net/socks.el (socks-open-network-stream): Signal an explicit diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 33dfb327864..4d098322c16 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -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. -- 2.39.5