Am 05.04.2010, 19:17 Uhr, schrieb Tres Seaver <>:

> For a template, the <meta> tag should be correct, if present.  No
> template cxcept for the main_template is likely ever to return that tag
> to the browser, but there is no reason we shouldn't believe it when
> loading the template as software.  I wouldn't require *any* template
> outside the main_template to set the DOCTYPE:  the potential for bugs in
> how ZPT (or chameleon) merge the "prefixes" of the documents is too high.

You're right, of course, that this should only affect main_template -  
there can only be one content type per view. I've narrowed the CMF issue  
down to ursa_globals + Firefox. Without a meta tag the content-type gets  
set to "; Charset=utf-8" whereas getMainGlobals sets "text/html;  
Charset=utf-8" in there.

if not 'charset' in (context.REQUEST.RESPONSE.getHeader('content-type') or  

                                     'text/html; charset=%s' %  

ct = self.request.RESPONSE.getHeader('content-type') or ''
                               '%s; charset=%s' % (ct, default_charset))

So getMainGlobals defaults to "text/html" and ursa_globals to " " for the  
content type. I think ursa_globals is wrong here.

Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to