mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Avoid error in submitting a form with EWW
* lisp/gnus/mm-url.el (mm-url-form-encode-xwfu): Allow argument CHUNK to be nil. (Bug#21881)
This commit is contained in:
parent
e887f6e33b
commit
436d330721
1 changed files with 12 additions and 11 deletions
|
|
@ -392,17 +392,18 @@ spaces. Die Die Die."
|
|||
(if (consp chunk)
|
||||
(setq chunk (cdr chunk)))
|
||||
|
||||
(mapconcat
|
||||
(lambda (char)
|
||||
(cond
|
||||
((= char ? ) "+")
|
||||
((memq char mm-url-unreserved-chars) (char-to-string char))
|
||||
(t (upcase (format "%%%02x" char)))))
|
||||
(mm-encode-coding-string chunk
|
||||
(if (fboundp 'find-coding-systems-string)
|
||||
(car (find-coding-systems-string chunk))
|
||||
buffer-file-coding-system))
|
||||
""))
|
||||
(if chunk
|
||||
(mapconcat
|
||||
(lambda (char)
|
||||
(cond
|
||||
((= char ? ) "+")
|
||||
((memq char mm-url-unreserved-chars) (char-to-string char))
|
||||
(t (upcase (format "%%%02x" char)))))
|
||||
(mm-encode-coding-string chunk
|
||||
(if (fboundp 'find-coding-systems-string)
|
||||
(car (find-coding-systems-string chunk))
|
||||
buffer-file-coding-system))
|
||||
"")))
|
||||
|
||||
(defun mm-url-encode-www-form-urlencoded (pairs)
|
||||
"Return PAIRS encoded for forms."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue