Changeset 12679
- Timestamp:
- Apr 15, 2014, 4:05:45 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/1.0-stable merged: 12678
- Property svn:mergeinfo changed
-
trunk/trac/web/chrome.py
r12632 r12679 499 499 500 500 templates = None 501 502 # DocType for 'text/html' output 503 html_doctype = DocType.XHTML_STRICT 501 504 502 505 # A dictionary of default context data for templates … … 975 978 976 979 The `content_type` argument is used to choose the kind of template 977 used (`NewTextTemplate` if `'text/plain'`, `MarkupTemplate` otherwise), 978 and tweak the rendering process (use of XHTML Strict doctype if 979 `'text/html'` is given). 980 used (`NewTextTemplate` if `'text/plain'`, `MarkupTemplate` 981 otherwise), and tweak the rendering process. Doctype for `'text/html'` 982 can be specified by setting the `html_doctype` attribute (default 983 is `XHTML_STRICT`) 980 984 981 985 The rendering `method` (xml, xhtml or text) may be specified and is … … 1022 1026 return buffer.getvalue() 1023 1027 1024 doctype = {'text/html': DocType.XHTML_STRICT}.get(content_type) 1025 if doctype: 1028 doctype = None 1029 if content_type == 'text/html': 1030 doctype = self.html_doctype 1026 1031 if req.form_token: 1027 1032 stream |= self._add_form_token(req.form_token)
Note:
See TracChangeset
for help on using the changeset viewer.