Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#60 FillingParser.handle_option selects any option with value=""

open
nobody
None
5
2008-12-05
2008-12-05
Brendan Doms
No

In FormEncode version 1.2 FillingParser.handle_option has a check on lines 463-464 of htmlfill.py, that if it passes, ads 'selected="selected"' to the option element. The nature of the check means that any option with an attribute of 'value=""' will pass and become selected. Not only is this not the desired behavior (only those options which have been specified in form defaults should be selected), but it also means that bizarre circumstances occur, such as having an option that has the attribute 'disabled="disabled"' still get selected, which most browsers are incapable of doing through normal user interactions.

Discussion