[basetemplates] do not use STRICT_DOCTYPE directly, use self.doctype to deal with non xhtml browser stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Mon, 08 Jun 2009 18:32:23 +0200
branchstable
changeset 2061 6a5044f15cb9
parent 2060 10d9fbdbed35
child 2062 20f18837107c
[basetemplates] do not use STRICT_DOCTYPE directly, use self.doctype to deal with non xhtml browser
web/views/basetemplates.py
--- a/web/views/basetemplates.py	Mon Jun 08 18:29:35 2009 +0200
+++ b/web/views/basetemplates.py	Mon Jun 08 18:32:23 2009 +0200
@@ -12,7 +12,7 @@
 
 from cubicweb.vregistry import objectify_selector
 from cubicweb.selectors import match_kwargs
-from cubicweb.view import View, MainTemplate,  NOINDEX, NOFOLLOW, STRICT_DOCTYPE
+from cubicweb.view import View, MainTemplate, NOINDEX, NOFOLLOW
 from cubicweb.utils import make_uid, UStringIO
 
 # main templates ##############################################################
@@ -86,7 +86,7 @@
         xhtml_wrap = (self.req.form.has_key('__notemplate') and view.templatable
                       and view.content_type == self.req.html_content_type())
         if xhtml_wrap:
-            view.w(u'<?xml version="1.0"?>\n' + STRICT_DOCTYPE)
+            view.w(u'<?xml version="1.0"?>\n' + self.doctype)
             view.w(u'<div xmlns="http://www.w3.org/1999/xhtml" xmlns:cubicweb="http://www.logilab.org/2008/cubicweb">')
         # have to replace our unicode stream using view's binary stream
         view.render()