Commit 9dd99753 authored by Kenjiro NAKAYAMA's avatar Kenjiro NAKAYAMA Committed by Lars Magne Ingebrigtsen
Browse files

Support <optgroup> tags in <select> forms.

* net/eww.el (eww-tag-select): Support <optgroup> tags in <select>

Test case:

<head><title>SELECT TEST</title></head>

<form method="POST" action="./dummy.php">
<input type="text" name="text1">
<input type="submit" name="btn1" value="val1">

<optgroup label="group 1">
<option value="a">Value A</option>
<option value="b">Value B</option>
<optgroup label="group 2">
<option value="c">Value C</option>
<option value="d">Value D</option>


Fixes: debbugs:15860
parent ab6dea82
2013-12-01 Kenjiro NAKAYAMA <>
* net/eww.el (eww-tag-select): Support <optgroup> tags in <select>
2013-12-01 Lars Magne Ingebrigtsen <>
* net/eww.el (eww-restore-history): Update the window title after
......@@ -737,8 +737,14 @@ appears in a <link> or <a> tag."
:eww-form eww-form))
(options nil)
(start (point))
(max 0))
(dolist (elem cont)
(max 0)
(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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment