Re: [Zope] Re: HTML post processing in Zope

2005-05-26 Thread Chris Withers
Cyrille Bonnet wrote: It works for me so far. But if you have specific examples that I can use to improve the filter, they would be very welcome. I think a filter is a totally abhorent way of attempting to tackle this... * replace html ... with html (remove the namespace information) *

[Zope] Re: HTML post processing in Zope

2005-05-26 Thread Cyrille Bonnet
Chris Withers wrote: Cyrille Bonnet wrote: It works for me so far. But if you have specific examples that I can use to improve the filter, they would be very welcome. I think a filter is a totally abhorent way of attempting to tackle this... OK, but again, if you have a better idea, it

[Zope] Re: HTML post processing in Zope

2005-05-24 Thread Tom Payne
Hi there, I only joined up a few weeks ago, so I missed the beginning of the thread, but I just thought I'd let you know that the __ac_name and __ac_password don't stop your page from validating. I thought this may be a HTML 4.01 quirk (it's been a while...) so I tested it on a dummy page

Re: [Zope] Re: HTML post processing in Zope

2005-05-23 Thread Chris Withers
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

[Zope] Re: HTML post processing in Zope

2005-05-23 Thread Cyrille Bonnet
Hi Chris, Well, you'd better believe it :-) It works for me so far. But if you have specific examples that I can use to improve the filter, they would be very welcome. Two additional things that I had to do to be HTML 4.01 compliant: * replace html ... with html (remove the namespace

[Zope] Re: HTML post processing in Zope

2005-05-16 Thread Cyrille Bonnet
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

[Zope] Re: HTML post processing in Zope

2005-05-16 Thread Cyrille Bonnet
Answering my own questions: Testing for text/html does the trick as WebDAV follows some other content type (probably text/xml). It works great! Cyrille Cyrille Bonnet wrote: Thanks for all your answers, I usually use Apache to change HTTP headers. But here, I need to post-process the HTML. The

[Zope] Re: HTML post processing in Zope

2005-05-05 Thread Cyrille Bonnet
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

Re: [Zope] Re: HTML post processing in Zope

2005-05-05 Thread Phillip Hutchings
On 06/05/05, Cyrille Bonnet [EMAIL PROTECTED] 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