On Nov 16, 2007, at 4:13 PM, Fred Moyer wrote:
Joseph Crotty wrote:
Want to set up tidy to automatically pretty print and indent HTML
(i.e., post PHP processing) and show errors via a mod_perl handler,
but not sure where to best do that? Output Filter?
I'm pretty sure you can use Apache::Clean as an output filter to do
this.
http://search.cpan.org/~geoff/Apache-Clean-2.00_7/
Apache::Clean is a mod_perl interface into HTML::Clean which is a
light weight HTML regex scrubber to remove unneeded whitespace,
unneeded elements, etc. The main intent is to "lighten" the HTML in
terms of page serve size. HTML::Clean is not nearly the robust tool
that W3C HTML Tidy is. The W3C Tidy lib is capable of much:
http://tidy.sourceforge.net/docs/tidy_man.html
Or is there an easier way to do this without using mod_perl2? I
have dug around on Google extensively and not coming up with any
examples mod_perl or otherwise.
Thanks,
Joe Crotty