diff options
author | Chong Yidong <cyd@gnu.org> | 2012-05-09 20:20:26 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-05-09 20:20:26 +0800 |
commit | bdac2d37fa5f83ec57d794523147dc5d5a179992 (patch) | |
tree | 79426859145b5adfc0455bca60dec56c6584fee1 /lisp/url/url-util.el | |
parent | ce7b18ec41c5102f4af27ec22cf873a75f510630 (diff) | |
download | emacs-bdac2d37fa5f83ec57d794523147dc5d5a179992.tar.gz emacs-bdac2d37fa5f83ec57d794523147dc5d5a179992.tar.bz2 emacs-bdac2d37fa5f83ec57d794523147dc5d5a179992.zip |
* url-util.el (url--allowed-chars): Use upper-case for percent-encoding.
Diffstat (limited to 'lisp/url/url-util.el')
-rw-r--r-- | lisp/url/url-util.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index c8016ef6cdb..4185c87918e 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -343,7 +343,10 @@ This is taken from RFC 3986 (section 2.3).") (defconst url-encoding-table (let ((vec (make-vector 256 nil))) (dotimes (byte 256) - (aset vec byte (format "%%%02x" byte))) + ;; RFC 3986 (Section 2.1): For consistency, URI producers and + ;; normalizers should use uppercase hexadecimal digits for all + ;; percent-encodings. + (aset vec byte (format "%%%02X" byte))) vec) "Vector translating bytes to URI-encoded %-sequences.") @@ -362,7 +365,7 @@ result can be passed as the second arg to `url-hexify-string'." If STRING is multibyte, it is first converted to a utf-8 byte string. Each byte corresponding to an allowed character is left as-is, while all other bytes are converted to a three-character -string: \"%\" followed by two lowercase hex digits. +string: \"%\" followed by two upper-case hex digits. The allowed characters are specified by ALLOWED-CHARS. If this argument is nil, the list `url-unreserved-chars' determines the |