From: RĂ¼diger Sonderfeld Date: Sun, 1 Dec 2013 15:38:43 +0000 (+0100) Subject: Treat HTML5 input types as text X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~604 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=10240949caee9cab6c29237dac743cfe6726fc76;p=emacs.git Treat HTML5 input types as text * net/eww.el (eww-text-input-types): : New const. (eww-process-text-input): Treat input types in `eww-text-input-types' as text. --- diff --git a/lisp/net/eww.el b/lisp/net/eww.el index ef03c7281be..2f481c31b15 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -634,12 +634,19 @@ appears in a or tag." :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.