Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2052 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

Errors on generated (X)HTML prevent Strict validation

Reported by: entfe001 Owned by: faide
Priority: normal Milestone: 1.1
Component: TurboGears Version: 1.0.7
Severity: normal Keywords:


There are two errors on the generated XHTML code that prevent a page to be fully XHTML-Strict compliant:

Every form is created with a name attribute which is not allowed in XHTML.

Hidden fields are placed right under the <form> tag instead of a block container, like div or fieldset.

Change History

comment:1 Changed 11 years ago by chrisz

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r5860.

Since forms addressed by name are still pretty common in HTML (though deprecated), I have added a use_name parameter that is by default True in TG 1.0 and False in TG 1.1 and 1.5. If it is set, then name is used instead of id. This should solve the problem while not breaking backward compatibility and allowing the user to override the default behavior. I have also added some tests and comments.

Note: See TracTickets for help on using tickets.