[Zope] Re: HTML post processing in Zope
Phillip Hutchings
sitharus at gmail.com
Thu May 5 17:45:18 EDT 2005
On 06/05/05, Cyrille Bonnet <cyrille at 3months.com> wrote:
> Thanks for all your answers,
>
> I usually use Apache to change HTTP headers. But here, I need to
> post-process the HTML.
>
> The reason is that the NZ Government Webguidelines require HTML 4.01 :-(
> and I'd like to keep Plone content and templates XHTML compliant.
>
> One way to do that is obviously to post-process the HTML with a language
> that is good at regular expressions (Perl?).
>
> But I thought it could be neat if the post-processing could be done in
> Zope itself.
>
> Anyway, I am looking at ZPublisher.HTTPResponse.HTTPResponse and it
> looks like the right place.
>
> Thanks for your help!
Yes, it's irritating isn't it? I've worked on an NZ government site
before, but in PHP.
You can use Apache to parse the HTML, mod_python allows you to use
PythonOutputFilters, where you can use a regexp to clean up the HTML.
I'd personally think that using Apache would be faster, but I may be
wrong.
--
Phillip Hutchings
http://www.sitharus.com/
sitharus at gmail.com / sitharus at sitharus.com
More information about the Zope
mailing list