Commit 9a0a786f authored by Jean-Paul Smets's avatar Jean-Paul Smets

Set text/html as default format.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14389 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ed296aa4
......@@ -37,6 +37,8 @@ from Products.ERP5Type.WebDAVSupport import TextContent
import re
DEFAULT_TEXT_FORMAT = 'text/html'
class TextDocument(Document, TextContent):
"""
A Document contains text which can be formatted using
......@@ -142,7 +144,7 @@ class TextDocument(Document, TextContent):
if format == 'raw':
return 'text/plain', self.getTextContent()
mime_type = getToolByName(self, 'mimetypes_registry').lookupExtension('name.%s' % format)
src_mimetype = self.getTextFormat()
src_mimetype = self.getTextFormat(DEFAULT_TEXT_FORMAT)
if not src_mimetype.startswith('text/'):
src_mimetype = 'text/%s' % src_mimetype
return mime_type, getToolByName(self, 'portal_transforms').convertTo(mime_type,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment