Closed alfonsodg closed 10 years ago
From massimod...@gmail.com on June 08, 2008 12:44:41
That is necessary to make OPTION "selected" attributes which are valid HTML http://www.w3.org/TR/html401/interact/forms.html#adef-selected
Summary: "checked" and "selected" are valid HTML attributes
From massimod...@gmail.com on June 08, 2008 12:50:58
That is necessary to make OPTION "selected" attributes which are valid HTML http://www.w3.org/TR/html401/interact/forms.html#adef-selected
Status: WontFix
From mmoore9...@gmail.com on June 10, 2008 01:48:01
Massimo,
Are you going to open this back up? ;o)
-MM
From mmoore9...@gmail.com on June 08, 2008 14:11:32
What steps will reproduce the problem? 1. Upload the attached application with web2py.
For extra credit, paste the output into the W3C XML Validator[2], and observe the "Failed validation, 4 Errors" result. What is the expected output? What do you see instead? I would expect well formed XML (e.g. passes W3C validation).
print TAG.root(TAG.option_(_value=0, _checked=None))
To be valid XML, the 'checked' attribute needs to be followed by an equal sign and a quoted value. (See XML Attribute definition.[3])
A better approach might be to drop the attribute for any attribute that has a value of 'None' because that would be semantically the same as a missing attribute. What version of the product are you using? On what operating system? * Web2py/VERSION: Version 1.34 (2008-05-22 08:56:38)
Attachment: web2py.app.bad_xml.tar
Original issue: http://code.google.com/p/web2py/issues/detail?id=8