mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-05-31 01:32:00 -07:00
Fix eww-submit for forms with no action (bug#80918)
* lisp/net/eww.el (eww-submit): If a form does not specify an action the assumed action is the current URL. If the current URL has an existing query part, that part must be replaced by the form values, rather than appended to. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
0e7a24d931
commit
09dc864b0b
1 changed files with 6 additions and 5 deletions
|
|
@ -2246,11 +2246,12 @@ Interactively, EVENT is the value of `last-nonmenu-event'."
|
|||
(plist-get eww-data :url)))))))
|
||||
(eww-browse-url
|
||||
(concat
|
||||
(if (cdr (assq :action form))
|
||||
(shr-expand-url (cdr (assq :action form)) (plist-get eww-data :url))
|
||||
(plist-get eww-data :url))
|
||||
"?"
|
||||
(mm-url-encode-www-form-urlencoded values))))))
|
||||
(shr-expand-url
|
||||
(or (cdr (assq :action form))
|
||||
(car (url-path-and-query (url-generic-parse-url (plist-get eww-data :url)))))
|
||||
(plist-get eww-data :url))
|
||||
"?"
|
||||
(mm-url-encode-www-form-urlencoded values))))))
|
||||
|
||||
(defun eww-browse-with-external-browser (&optional url)
|
||||
"Browse the current URL with an external browser.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue