all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#22388: 24.5; [PATCH] eww fails submitting searches involving hidden fields with no value
@ 2016-01-16 21:06 Vasilij Schneidermann
  2016-02-04  4:53 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Vasilij Schneidermann @ 2016-01-16 21:06 UTC (permalink / raw)
  To: 22388


[-- Attachment #1.1: Type: text/plain, Size: 290 bytes --]

See title.  The website exhibiting hidden fields with a name, but no
value attribute was http://google.com/.  I've attached a patch working
around the problem, but am not really happy with it as there's a number
of other places assuming that plist access will always yield a non-nil
value.

[-- Attachment #1.2: Type: text/html, Size: 375 bytes --]

[-- Attachment #2: 0001-Encode-missing-value-as-empty-string.patch --]
[-- Type: text/x-diff, Size: 750 bytes --]

From 221329124157f1fb0825eddebe0bc21118350b6f Mon Sep 17 00:00:00 2001
From: Vasilij Schneidermann <v.schneidermann@gmail.com>
Date: Sat, 16 Jan 2016 22:03:42 +0100
Subject: [PATCH] Encode missing value as empty string

---
 lisp/net/eww.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 3c2e747..d111152 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1138,7 +1138,7 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
 	  (nconc eww-form (list
 			   (list 'hidden
 				 :name name
-				 :value (dom-attr dom 'value)))))))
+				 :value (or (dom-attr dom 'value) "")))))))
      (t
       (eww-form-text dom)))
     (unless (= start (point))
-- 
2.6.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#22388: 24.5; [PATCH] eww fails submitting searches involving hidden fields with no value
  2016-01-16 21:06 bug#22388: 24.5; [PATCH] eww fails submitting searches involving hidden fields with no value Vasilij Schneidermann
@ 2016-02-04  4:53 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-04  4:53 UTC (permalink / raw)
  To: Vasilij Schneidermann; +Cc: 22388

Vasilij Schneidermann <v.schneidermann@gmail.com> writes:

> See title. The website exhibiting hidden fields with a name, but no
> value attribute was http://google.com/. I've attached a patch working
> around the problem, but am not really happy with it as there's a number
> of other places assuming that plist access will always yield a non-nil
> value.

Thanks; applied to emacs-25.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-04  4:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-16 21:06 bug#22388: 24.5; [PATCH] eww fails submitting searches involving hidden fields with no value Vasilij Schneidermann
2016-02-04  4:53 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.