diff options
author | Eli Zaretskii <eliz@gnu.org> | 2015-11-11 22:01:39 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2015-11-11 22:01:39 +0200 |
commit | 436d3307211db86d5606e6cec51d6fbe9f7572a8 (patch) | |
tree | 6ac9a39ddcf7464f8b174229a393216464e273d0 /lisp/gnus | |
parent | e887f6e33bd22eee5102f85c04397483169a1722 (diff) | |
download | emacs-436d3307211db86d5606e6cec51d6fbe9f7572a8.tar.gz |
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)
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/mm-url.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el index 6d5f2a34c79..ecc5ac47624 100644 --- a/lisp/gnus/mm-url.el +++ b/lisp/gnus/mm-url.el @@ -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." |