From 6127adf6bae65f0d371a64d74cb5e618e711384f Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Tue, 5 May 2009 14:17:32 +0000 Subject: [PATCH] Use portal_transform to convert html to plain text, in order to improve the ODT rendering. Instead of adding this in the page template, it could be better to handle this convertion directly in the field. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26814 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../SkinTemplateItem/portal_skins/erp5_odt_style/form_view.xml | 2 +- bt5/erp5_odt_style/bt/revision | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_odt_style/SkinTemplateItem/portal_skins/erp5_odt_style/form_view.xml b/bt5/erp5_odt_style/SkinTemplateItem/portal_skins/erp5_odt_style/form_view.xml index 7b07b9fa66..c304eb9ae1 100644 --- a/bt5/erp5_odt_style/SkinTemplateItem/portal_skins/erp5_odt_style/form_view.xml +++ b/bt5/erp5_odt_style/SkinTemplateItem/portal_skins/erp5_odt_style/form_view.xml @@ -382,7 +382,7 @@ bWxQSwUGAAAAAAIAAgCeAAAAhwwAAAAA</string> </value> </tal:block>\n <tal:block tal:condition="python: (not (same_type(value,[]) or same_type(value,()) )) and (value != None)">\n <tal:block tal:condition="python: field_type==\'EditorField\' and field.get_value(\'text_editor\')==\'fck_editor\'">\n - <tal:block tal:content="structure python: field.render_pdf(value)" />\n + <text:p text:style-name=\'field-content-center\' tal:content="structure python: str(field.render_pdf(field.portal_transforms.convertToData(\'text/plain\', value))).replace(\'&\', \'&amp;\').replace(\'>\', \'&gt;\').replace(\'<\', \'&lt;\').replace(\'\\n\', \'<text:line-break/>\')" />\n </tal:block>\n <tal:block tal:condition="python: field_type in (\'EditorField\',) and field.get_value(\'text_editor\')==\'text_area\'">\n <text:p text:style-name=\'field-content-center\'\n diff --git a/bt5/erp5_odt_style/bt/revision b/bt5/erp5_odt_style/bt/revision index 9cd72aa941..e77a96349c 100644 --- a/bt5/erp5_odt_style/bt/revision +++ b/bt5/erp5_odt_style/bt/revision @@ -1 +1 @@ -72 \ No newline at end of file +73 \ No newline at end of file -- 2.30.9