GNU bug report logs - #15704
[PATCH 2/8] EWW: Handle HTML5 input types as text input.

Previous Next

Package: emacs;

Reported by: Rüdiger Sonderfeld <ruediger <at> c-plusplus.de>

Date: Thu, 24 Oct 2013 23:44:06 UTC

Severity: normal

Tags: fixed, patch

Merged with 15702, 15703, 15705, 15706, 15707, 15708, 15709, 15710

Fixed in version 24.4

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rüdiger Sonderfeld <ruediger <at> c-plusplus.de>
To: bug-gnu-emacs <at> gnu.org
Cc: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Subject: [PATCH 2/8] EWW: Handle HTML5 input types as text input.
Date: Fri, 25 Oct 2013 01:43:28 +0200
HTML5 adds a bunch of new input types which can be treated as text.

* lisp/net/eww.el (eww-text-input-types): New const.
  (eww-process-text-input): Treat input types in
  `eww-text-input-types' as text.

Signed-off-by: Rüdiger Sonderfeld <ruediger <at> c-plusplus.de>
---
 lisp/net/eww.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 989cd2e..ccc2399 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -631,12 +631,19 @@ (defun eww-form-text (cont)
 			     :name (cdr (assq :name cont))))
     (insert " ")))
 
+(defconst eww-text-input-types '("text" "password" "textarea"
+                                 "color" "date" "datetime" "datetime-local"
+                                 "email" "month" "number" "search" "tel"
+                                 "time" "url" "week")
+  "List of input types which represent a text input.
+See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
+
 (defun eww-process-text-input (beg end length)
   (let* ((form (get-text-property (min (1+ end) (point-max)) 'eww-form))
 	 (properties (text-properties-at end))
 	 (type (plist-get form :type)))
     (when (and form
-	       (member type '("text" "password" "textarea")))
+	       (member type eww-text-input-types))
       (cond
        ((zerop length)
 	;; Delete some space at the end.
-- 
1.8.4.1






This bug report was last modified 11 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.