GNU bug report logs - #15860
24.3.50; [PATCH] eww: Handle optgroup tag.

Previous Next

Package: emacs;

Reported by: <nakayamakenjiro <at> gmail.com>

Date: Mon, 11 Nov 2013 16:44:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 24.3.50

Fixed in version 24.4

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15860 in the body.
You can then email your comments to 15860 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15860; Package emacs. (Mon, 11 Nov 2013 16:44:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to <nakayamakenjiro <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 11 Nov 2013 16:44:02 GMT) Full text and rfc822 format available.

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

From: <nakayamakenjiro <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; [PATCH] eww: Handle optgroup tag.
Date: Tue, 12 Nov 2013 00:53:34 +0900
If HTML has optgroup tag, the select box with options disapears. eww should support optgroup tag.

Signed-off-by: Kenjiro Nakayama <nakayamakenjiro <at> gmail.com>
---
 lisp/net/eww.el | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 573715e..4fe88b6 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -725,7 +725,15 @@ appears in a <link> or <a> tag."
        (options nil)
        (start (point))
        (max 0))
-    (dolist (elem cont)
+    (let ((opelem))
+    (cond ((eq (car (car cont)) 'optgroup)
+         (dolist (groupelem cont)
+           (unless (cdr (assq :disabled (cdr groupelem)))
+              (setq opelem (nconc opelem (cdr (cdr groupelem)))))
+             ))
+         (t
+          (setq opelem cont)))
+    (dolist (elem opelem)
       (when (eq (car elem) 'option)
        (when (cdr (assq :selected (cdr elem)))
          (nconc menu (list :value
@@ -735,7 +743,7 @@ appears in a <link> or <a> tag."
          (push (list 'item
                      :value (cdr (assq :value (cdr elem)))
                      :display display)
-               options))))
+               options)))))
     (when options
       (setq options (nreverse options))
       ;; If we have no selected values, default to the first value.
-- 
1.8.3.1




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15860; Package emacs. (Sun, 24 Nov 2013 15:36:02 GMT) Full text and rfc822 format available.

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

From: Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>
To: 15860 <at> debbugs.gnu.org
Date: Mon, 25 Nov 2013 00:34:52 +0900
The following HTML(test.html) reproduces the bug.

* Reproduce the bug.

 1. M-x ewww-open-file RET
 2. ~/$PATH_TO_THE_FILE/test.html
 3. select box with options(Value A to D) dispears.

-- test.html --
<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>
--




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 01 Dec 2013 13:23:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.4, send any further explanations to 15860 <at> debbugs.gnu.org and <nakayamakenjiro <at> gmail.com> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 01 Dec 2013 13:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15860; Package emacs. (Sun, 01 Dec 2013 13:25:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: <nakayamakenjiro <at> gmail.com>
Cc: 15860 <at> debbugs.gnu.org
Subject: Re: bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag.
Date: Sun, 01 Dec 2013 14:23:48 +0100
<nakayamakenjiro <at> gmail.com> writes:

> If HTML has optgroup tag, the select box with options disapears. eww
> should support optgroup tag.

I've now applied the patch (with some changes).

But after checking it in, I noticed that you have two other small
patches to eww already in the code.  I don't think the number of lines
exceeds the limit, but would you be willing to sign a copyright
assignment form for code to Emacs?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15860; Package emacs. (Mon, 02 Dec 2013 11:46:01 GMT) Full text and rfc822 format available.

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

From: Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: nakayamakenjiro <at> gmail.com, 15860 <at> debbugs.gnu.org
Subject: Re: bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag.
Date: Mon, 02 Dec 2013 20:44:50 +0900
> exceeds the limit, but would you be willing to sign a copyright
> assignment form for code to Emacs?

Yes, I will sign a copyright assignment form soon.

Kenjiro NAKAYAMA




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 30 Dec 2013 12:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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