Changeset 12678
- Timestamp:
- Apr 15, 2014, 4:03:53 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0-stable/trac/web/chrome.py
r12637 r12678 503 503 504 504 templates = None 505 506 # DocType for 'text/html' output 507 html_doctype = DocType.XHTML_STRICT 505 508 506 509 # A dictionary of default context data for templates … … 971 974 972 975 The `content_type` argument is used to choose the kind of template 973 used (`NewTextTemplate` if `'text/plain'`, `MarkupTemplate` otherwise), 974 and tweak the rendering process (use of XHTML Strict doctype if 975 `'text/html'` is given). 976 used (`NewTextTemplate` if `'text/plain'`, `MarkupTemplate` 977 otherwise), and tweak the rendering process. Doctype for `'text/html'` 978 can be specified by setting the `html_doctype` attribute (default 979 is `XHTML_STRICT`) 976 980 977 981 When `fragment` is specified, the (filtered) Genshi stream is … … 1013 1017 return buffer.getvalue() 1014 1018 1015 doctype = {'text/html': DocType.XHTML_STRICT}.get(content_type) 1016 if doctype: 1019 doctype = None 1020 if content_type == 'text/html': 1021 doctype = self.html_doctype 1017 1022 if req.form_token: 1018 1023 stream |= self._add_form_token(req.form_token)
Note:
See TracChangeset
for help on using the changeset viewer.