* net/eww.el (eww-tag-select): Support <optgroup> tags in <select>
forms.
Test case:
<html>
<head><title>SELECT TEST</title></head>
<body>
<form method="POST" action="./dummy.php">
<input type="text" name="text1">
<input type="submit" name="btn1" value="val1">
<select>
<optgroup label="group 1">
<option value="a">Value A</option>
<option value="b">Value B</option>
</optgroup>
<optgroup label="group 2">
<option value="c">Value C</option>
<option value="d">Value D</option>
</optgroup>
</select>
</form>
</body>
</html>
Fixes: debbugs:15860
+2013-12-01 Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com>
+
+ * net/eww.el (eww-tag-select): Support <optgroup> tags in <select>
+ forms.
+
2013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/eww.el (eww-restore-history): Update the window title after
:eww-form eww-form))
(options nil)
(start (point))
- (max 0))
- (dolist (elem cont)
+ (max 0)
+ opelem)
+ (if (eq (car (car cont)) 'optgroup)
+ (dolist (groupelem cont)
+ (unless (cdr (assq :disabled (cdr groupelem)))
+ (setq opelem (append opelem (cdr (cdr groupelem))))))
+ (setq opelem cont))
+ (dolist (elem opelem)
(when (eq (car elem) 'option)
(when (cdr (assq :selected (cdr elem)))
(nconc menu (list :value