equal
deleted
inserted
replaced
34 |
34 |
35 def xhtml_wrap(self, source): |
35 def xhtml_wrap(self, source): |
36 # XXX factor out, watch view.py ~ Maintemplate.doctype |
36 # XXX factor out, watch view.py ~ Maintemplate.doctype |
37 if self.req.xhtml_browser(): |
37 if self.req.xhtml_browser(): |
38 dt = STRICT_DOCTYPE |
38 dt = STRICT_DOCTYPE |
39 dt = STRICT_DOCTYPE_NOEXT |
39 else: |
|
40 dt = STRICT_DOCTYPE_NOEXT |
40 head = u'<?xml version="1.0"?>\n' + dt |
41 head = u'<?xml version="1.0"?>\n' + dt |
41 return head + u'<div xmlns="http://www.w3.org/1999/xhtml" xmlns:cubicweb="http://www.logilab.org/2008/cubicweb">%s</div>' % source.strip() |
42 return head + u'<div xmlns="http://www.w3.org/1999/xhtml" xmlns:cubicweb="http://www.logilab.org/2008/cubicweb">%s</div>' % source.strip() |
42 |
43 |
43 def jsonize(func): |
44 def jsonize(func): |
44 """decorator to sets correct content_type and calls `simplejson.dumps` on |
45 """decorator to sets correct content_type and calls `simplejson.dumps` on |