Commit 436d3307 authored by Eli Zaretskii's avatar Eli Zaretskii

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)
parent e887f6e3
......@@ -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."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment