Ticket #5639: css-conversion.patch
| File css-conversion.patch, 1.3 KB (added by jens.b@…, 5 years ago) |
|---|
-
web_ui.py
62 62 def get_supported_conversions(self): 63 63 yield ('txt', _('Plain Text'), 'txt', 'text/x-trac-wiki', 'text/plain', 64 64 9) 65 yield ('css', _('Style sheet'), 'css', 'text/x-trac-wiki', 'text/css', 66 9) 65 67 66 68 def convert_content(self, req, mimetype, content, key): 67 # Tell the browser that the content should be downloaded and 68 # not rendered. The x=y part is needed to keep Safari from being 69 # confused by the multiple content-disposition headers. 70 req.send_header('Content-Disposition', 'attachment; x=y') 69 if key == 'txt': 70 # Tell the browser that the content should be downloaded and 71 # not rendered. The x=y part is needed to keep Safari from being 72 # confused by the multiple content-disposition headers. 73 req.send_header('Content-Disposition', 'attachment; x=y') 71 74 72 return (content, 'text/plain;charset=utf-8') 75 return (content, 'text/plain;charset=utf-8') 76 elif key == 'css': 77 return (content, 'text/css;charset=utf-8') 73 78 74 79 # INavigationContributor methods 75 80
