[Zope] Re: HTML post processing in Zope
Chris Withers
chris at simplistix.co.uk
Mon May 23 14:49:35 EDT 2005
Cyrille Bonnet wrote:
> Hi all,
>
> I got the filter to work. I just added 3 lines of code in
> "ZPublisher.HTTPResponse.HTTPResponse" (thanks for your suggestion,
> Dieter):
>
> doctype_str_search = re.compile(r'<!DOCTYPE.*>')
> body = doctype_str_search.sub('<!DOCTYPE HTML PUBLIC
> "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">', body)
>
> body = body.replace('/>', '>')
You can't be serious, right?
The above do NOT suddenly make it HTML 4.01, I'm 90% sure ;-)
Really, you should be customising the templates to serve HTML in the
format you need rather than persuing this insanity...
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope
mailing list