aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorHong Xu2019-10-14 06:46:47 +0200
committerLars Ingebrigtsen2019-10-14 06:46:47 +0200
commit9aa13cd4beccfe41e8f4930cb029bd60e7788e93 (patch)
tree93968ba332ad4623b8251d081175641f7146c1dc /lisp
parent8aeba640460adbad283d4a18f91cce8e0364c40d (diff)
downloademacs-9aa13cd4beccfe41e8f4930cb029bd60e7788e93.tar.gz
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')
-rw-r--r--lisp/url/url-util.el9
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.
395 395
396The allowed characters are specified by ALLOWED-CHARS. If this 396The allowed characters are specified by ALLOWED-CHARS. If this
397argument is nil, the list `url-unreserved-chars' determines the 397argument is nil, the list `url-unreserved-chars' determines the
398allowed characters. Otherwise, ALLOWED-CHARS should be a vector 398allowed characters. Otherwise, ALLOWED-CHARS should be either a
399whose Nth element is non-nil if character N is allowed." 399list of allowed chars, or a vector whose Nth element is non-nil
400 (unless allowed-chars 400if character N is allowed."
401 (if allowed-chars
402 (unless (vectorp allowed-chars)
403 (setq allowed-chars (url--allowed-chars allowed-chars)))
401 (setq allowed-chars (url--allowed-chars url-unreserved-chars))) 404 (setq allowed-chars (url--allowed-chars url-unreserved-chars)))
402 (mapconcat (lambda (byte) 405 (mapconcat (lambda (byte)
403 (if (aref allowed-chars byte) 406 (if (aref allowed-chars byte)