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:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user