On 2005-04-20, Rhesa Rozendaal <suppressed> wrote:
> Hi,
>
> This may not be the most appropriate list, but anyway. I'll spin it into relevancy at the end :-)
>
> I was wondering what you guys are using to ensure the validity of your html output.
>
> I've been shopping around on CPAN, and found a *lot* of HTML related modules. So far I've tried the following:
>
> - HTML::Scrubber
> Not good enough for general use. Breaks stuff.
> - HTML::Detoxifier
> Close, but needs work. It missed the <center> tag.
> - Formatter::HTML::HTML
> A frontend to HTML::Tidy. Nice, solid. Produces almost valid HTML 4.01 Transitional.
> Doesn't put required attributes in when missing.
I've been thinking about approaching the problem from the other end:
Having valid HTML::Template files in the first place.
I've run into one niggle which I haven't yet resolved.
Sometimes i need to use a template token inside of a html tag, like
this:
<form action="<tmpl_var cfg_instance_cgi>">
Experience has shown that it works better to use this style rather than
the comment style here, but neither is valid HTML.
I did make a filter so that the HTML::Template tag can be URL-encoded.
Still, I haven't figured out the last mile of making HTML::Template
files than can validated as Good HTML.
There is also the possibility that something in the token will cause the
final result to become invalid HTML, but that is a minimal concern for
me. I might lean towards a 'tidy' based tool to help with that
because I am already familiar with that.
Mark
--
http://mark.stosberg.com/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.