Am 05.04.2010, 19:17 Uhr, schrieb Tres Seaver <tsea...@palladion.com>:

> 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.

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

context.REQUEST.RESPONSE.setHeader('content-type',
                                     'text/html; charset=%s' %  
default_charset)

ursa_globals
ct = self.request.RESPONSE.getHeader('content-type') or ''
...
self.request.RESPONSE.setHeader('content-type',
                               '%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
-- 
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to