From d583b36b05d14fe7330a75262d4950770c42adb0 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 11 Jun 2013 03:09:59 +0000 Subject: [PATCH] lisp/gnus/eww.el (eww-tag-input): Support password fields (eww-submit): Support POST --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/eww.el | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 4003d3a51f..9809f5a743 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2013-06-11 Lars Magne Ingebrigtsen + + * eww.el (eww-tag-input): Support password fields. + (eww-submit): Support POST. + 2013-06-10 Lars Magne Ingebrigtsen * eww.el (eww-tag-form): Protect against degenerate forms. diff --git a/lisp/gnus/eww.el b/lisp/gnus/eww.el index 9a7435fc54..ca7b8c097b 100644 --- a/lisp/gnus/eww.el +++ b/lisp/gnus/eww.el @@ -32,6 +32,7 @@ (defvar eww-current-url nil) (defvar eww-history nil) +;;;###autoload (defun eww (url) "Fetch URL and render the page." (interactive "sUrl: ") @@ -213,6 +214,7 @@ (or (cdr (assq :size cont)) "40")) :value (or (cdr (assq :value cont)) "") + :secret (and (equal type "password") ?*) :action 'eww-submit :name (cdr (assq :name cont)) :eww-form eww-form))))) @@ -279,11 +281,13 @@ (plist-get (cdr elem) :value)) values))) (let ((shr-base eww-current-url)) - (if (and (stringp (plist-get form :method)) - (equal (downcase (plist-get form :method)) "post")) + (if (and (stringp (cdr (assq :method form))) + (equal (downcase (cdr (assq :method form))) "post")) (let ((url-request-method "POST") + (url-request-extra-headers + '(("Content-Type" . "application/x-www-form-urlencoded"))) (url-request-data (mm-url-encode-www-form-urlencoded values))) - (eww-browse-url (shr-expand-url (plist-get form :action)))) + (eww-browse-url (shr-expand-url (cdr (assq :action form))))) (eww-browse-url (shr-expand-url (concat -- 2.39.2