From 86894e61783ef36deefac64b6352734e6246bdb4 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Thu, 13 Sep 2007 13:20:24 +0000
Subject: [PATCH] make sure we get a string

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

diff --git a/product/ERP5/Document/Document.py b/product/ERP5/Document/Document.py
index d049b85bc8..51df2165c5 100644
--- a/product/ERP5/Document/Document.py
+++ b/product/ERP5/Document/Document.py
@@ -1098,7 +1098,7 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin):
     charset_list = self.charset_parser.findall(str(html)) # XXX - Not efficient is datastream 
                                                           # instance but hard to do better
     if charset_list:
-      stripped_html = unicode(stripped_html, charset_list[0]).encode('utf-8')
+      stripped_html = unicode(str(stripped_html), charset_list[0]).encode('utf-8')
     return stripped_html
 
   security.declareProtected(Permissions.AccessContentsInformation, 'getContentInformation')
-- 
2.30.9