On 9 Oct 2007, at 04:04, Marek wrote:
if I understand well, it is extremely difficult to make CGI.pm produce
valid html

My problem are the many <p /> tags in the form - and the checked
instead of checked="checked" in the input-tags. But probably I am not
yet understanding CGI.pm?

It has been a long while since I tried generating HTML with CGI.pm (these days I lean very strongly towards Template-Toolkit), but I'd be surprised if it produced <p /> since its either non-Appendix C conformant, nonsensical XHTML (a content-less paragraph) or its, in HTML, "Start of paragraph followed by a greater than sign" and using features marked as badly supported - avoid.

checked rather than checked="checked" is fine in HTML (checked="checked" is another of the "avoid this, its badly supported" features).

According to the CGI.pm documentation, it defaults to XHTML (so it should be outputting checked="checked") unless you use -dtd to specify an HTML 2.0 or 3.2 DTD. (Why not HTML 4.x I've no idea). You can also use the -no_xhtml pragma to turn off XHTML generation.

Turning off XHTML generation is generally a good thing: http:// www.webdevout.net/articles/beware-of-xhtml

... but I'll stick to Template-Toolkit

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to