diff options
author | Hong Xu <hong@topbug.net> | 2019-10-14 06:46:47 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-10-14 06:46:47 +0200 |
commit | 9aa13cd4beccfe41e8f4930cb029bd60e7788e93 (patch) | |
tree | 93968ba332ad4623b8251d081175641f7146c1dc /lisp/url/url-util.el | |
parent | 8aeba640460adbad283d4a18f91cce8e0364c40d (diff) | |
download | emacs-9aa13cd4beccfe41e8f4930cb029bd60e7788e93.tar.gz emacs-9aa13cd4beccfe41e8f4930cb029bd60e7788e93.tar.bz2 emacs-9aa13cd4beccfe41e8f4930cb029bd60e7788e93.zip |
Make url-hexify-string accept a list of allowed chars (bug#26469)
* lisp/url/url-util.el (url-hexify-string): Accept a list of allowed
chars.
* doc/misc/url.texi (URI Encoding): Update url-hexify-string doc and
index improvements (bug#24694).
Diffstat (limited to 'lisp/url/url-util.el')
-rw-r--r-- | lisp/url/url-util.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index a390723e73d..223a6ba9829 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -395,9 +395,12 @@ 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 -allowed characters. Otherwise, ALLOWED-CHARS should be a vector -whose Nth element is non-nil if character N is allowed." - (unless allowed-chars +allowed characters. Otherwise, ALLOWED-CHARS should be either a +list of allowed chars, or a vector whose Nth element is non-nil +if character N is allowed." + (if allowed-chars + (unless (vectorp allowed-chars) + (setq allowed-chars (url--allowed-chars allowed-chars))) (setq allowed-chars (url--allowed-chars url-unreserved-chars))) (mapconcat (lambda (byte) (if (aref allowed-chars byte) |