Opened 18 years ago
Closed 18 years ago
#109 closed defect (invalid)
"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
Change History (3)
comment:1 follow-up: ↓ 2 Changed 18 years ago by cmlenz
comment:2 in reply to: ↑ 1 Changed 18 years 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.
comment:3 Changed 18 years ago by cmlenz
- Milestone 0.4 deleted
- Resolution set to invalid
- Status changed from new to closed
Okay, so I'm closing this as invalid.
I believe that code in Trac is wrong: to strip out the attribute, the value needs to be None, not an empty string.