Edgewall Software

Ticket #109 (closed defect: invalid)

Opened 19 months ago

Last modified 19 months ago

"selected" attribute for <option> tag is broken in r502

Reported by: pkou@… Owned by: cmlenz
Priority: major Milestone:
Component: Template processing Version: devel
Keywords: Cc:

Description

When HTML is created using genshi.builder.tag, then the attribute selected="selected" is not set properly for tags `<select><option selected="?" /></select>

The builder adds the attribute selected="selected" for all options regardless if they have been set as selected or not in original source code.

Source of the problem: http://groups.google.com/group/trac-dev/browse_thread/thread/b364abaf4bfa4159

Source code that shows the problem: http://trac.edgewall.org/browser/sandbox/pycon/workflow/trac/ticket/api.py#L201

Attachments

Change History

follow-up: ↓ 2   Changed 19 months ago by cmlenz

I believe that code in Trac is wrong: to strip out the attribute, the value needs to be None, not an empty string.

in reply to: ↑ 1   Changed 19 months ago by pkou at ua.fm

Replying to cmlenz:

I believe that code in Trac is wrong: to strip out the attribute, the value needs to be None, not an empty string.

It is correct. Replacing "" with None fixes the problem. Thank you for the notice.

  Changed 19 months ago by cmlenz

  • status changed from new to closed
  • resolution set to invalid
  • milestone 0.4 deleted

Okay, so I'm closing this as invalid.

Add/Change #109 ("selected" attribute for <option> tag is broken in r502)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.