From 363034bc418d53de3dea1e525e78a1f3d8963d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Fri, 10 Feb 2006 10:23:54 +0000 Subject: [PATCH] handle backslash caracters at import in portal types roles items git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5666 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/BusinessTemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index b433b335f1..a0fb24e938 100755 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -1821,7 +1821,7 @@ class PortalTypeRolesTemplateItem(BaseTemplateItem): for property in property_list: property_id = property.getAttribute('id').encode() if property.hasChildNodes(): - property_value = property.childNodes[0].data.encode() + property_value = property.childNodes[0].data.encode('utf_8', 'backslashreplace') if property_id == 'priority': property_value = float(property_value) type_role_property_dict[property_id] = property_value @@ -1832,7 +1832,7 @@ class PortalTypeRolesTemplateItem(BaseTemplateItem): if not type_role_property_dict.has_key(property_id): type_role_property_dict[property_id] = [] if property.hasChildNodes(): - property_value = property.childNodes[0].data.encode() + property_value = property.childNodes[0].data.encode('utf_8', 'backslashreplace') type_role_property_dict[property_id].append(property_value) type_roles_list.append(type_role_property_dict) self._objects['portal_type_roles/'+file_name[:-4]] = type_roles_list -- 2.30.9