diff options
| author | Chong Yidong | 2012-05-09 20:39:40 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-05-09 20:39:40 +0800 |
| commit | 00fd78ed4f34548d1e7bca6fe28b74decd4bef39 (patch) | |
| tree | 70672283a4906f356db67a5503cd8c0529127593 | |
| parent | bdac2d37fa5f83ec57d794523147dc5d5a179992 (diff) | |
| download | emacs-00fd78ed4f34548d1e7bca6fe28b74decd4bef39.tar.gz emacs-00fd78ed4f34548d1e7bca6fe28b74decd4bef39.zip | |
Encoding fix for browse-url-encode-url.
* lisp/net/browse-url.el (browse-url-url-encode-chars): Use upper-case.
(browse-url-encode-url): Encode spaces and quotes.
Fixes: debbugs:6300
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/browse-url.el | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 635a24deead..bf15cd2f9aa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-05-09 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * net/browse-url.el (browse-url-url-encode-chars): Use upper-case. | ||
| 4 | (browse-url-encode-url): Encode spaces and quotes (Bug#6300). | ||
| 5 | |||
| 1 | 2012-05-09 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2012-05-09 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * shell.el (shell-completion-vars): Fix last change (bug#11348). | 8 | * shell.el (shell-completion-vars): Fix last change (bug#11348). |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 62c0e317a81..f4e7e942931 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -642,7 +642,7 @@ CHARS is a regexp-like character alternative (e.g., \"[)$]\")." | |||
| 642 | (s 0)) | 642 | (s 0)) |
| 643 | (while (setq s (string-match chars encoded-text s)) | 643 | (while (setq s (string-match chars encoded-text s)) |
| 644 | (setq encoded-text | 644 | (setq encoded-text |
| 645 | (replace-match (format "%%%x" | 645 | (replace-match (format "%%%X" |
| 646 | (string-to-char (match-string 0 encoded-text))) | 646 | (string-to-char (match-string 0 encoded-text))) |
| 647 | t t encoded-text) | 647 | t t encoded-text) |
| 648 | s (1+ s))) | 648 | s (1+ s))) |
| @@ -655,7 +655,7 @@ regarding its parameter treatment." | |||
| 655 | ;; FIXME: Is there an actual example of a web browser getting | 655 | ;; FIXME: Is there an actual example of a web browser getting |
| 656 | ;; confused? (This used to encode commas, but at least Firefox | 656 | ;; confused? (This used to encode commas, but at least Firefox |
| 657 | ;; handles commas correctly and doesn't accept encoded commas.) | 657 | ;; handles commas correctly and doesn't accept encoded commas.) |
| 658 | (browse-url-url-encode-chars url "[)$]")) | 658 | (browse-url-url-encode-chars url "[\")$] ")) |
| 659 | 659 | ||
| 660 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 660 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 661 | ;; URL input | 661 | ;; URL input |