[Checkins] SVN: Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py revert 119651
Godefroid Chapelle
gotcha at bubblenet.be
Thu Jan 13 09:23:12 EST 2011
Log message for revision 119565:
revert 119651
Changed:
U Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py
-=-
Modified: Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py
===================================================================
--- Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py 2011-01-13 12:54:14 UTC (rev 119564)
+++ Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py 2011-01-13 14:23:12 UTC (rev 119565)
@@ -101,9 +101,17 @@
parser = ConfigParser()
title = self.context.Title()
- title_str = title.encode(self._encoding)
+ if isinstance(title, unicode):
+ title_str = title.encode(self._encoding)
+ else:
+ # avoid double encoding in case of encoded string
+ title_str = title
description = self.context.Description()
- description_str = description.encode(self._encoding)
+ if isinstance(description, unicode):
+ description_str = description.encode(self._encoding)
+ else:
+ # avoid double encoding in case of encoded string
+ description_str = description
parser.set('DEFAULT', 'Title', title_str)
parser.set('DEFAULT', 'Description', description_str)
More information about the checkins
mailing list