[ZPT] TAL generating invalid HTML
Jean Jordaan
jean at upfrontsystems.co.za
Fri Apr 25 12:39:50 EDT 2003
Hi there ..
I just noticed that TAL can generate invalid HTML. This snippet
correctly raises an error::
<input tal:attributes="value request/user/id"
type="checkbox" name="creator">created by me</input>
It results in:
"""
A problem occurred in your template "issue.search".
Compilation failed
roundup.cgi.TAL.HTMLTALParser.EmptyTagError: Close tag </input> should
be removed, at line 89, column 54
"""
However, this snippet::
<input tal:repeat="s db/user/list"
tal:attributes="value s/username"
tal:content="s/username"
type="checkbox" name="creator"/>
incorrectly generates this::
<input type="checkbox" name="creator" value="jean">jean</input>
while for INPUT the spec says: "Start tag: required, End tag: forbidden"
--
Jean Jordaan
http://www.upfrontsystems.co.za
More information about the ZPT
mailing list