From 9a0a786f8318a48eaa200aa70612c5a3d5d6c416 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Sat, 5 May 2007 15:15:48 +0000
Subject: [PATCH] Set text/html as default format.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14389 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/TextDocument.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/Document/TextDocument.py b/product/ERP5/Document/TextDocument.py
index 6d96e93db6..9aca010c66 100644
--- a/product/ERP5/Document/TextDocument.py
+++ b/product/ERP5/Document/TextDocument.py
@@ -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,
-- 
2.30.9