Commit 64fd6401 authored by Nicolas Delaby's avatar Nicolas Delaby

Overload pt_edit to avoid storing content as unicode

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18763 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6c0edf68
...@@ -193,6 +193,14 @@ class OOoTemplate(ZopePageTemplate): ...@@ -193,6 +193,14 @@ class OOoTemplate(ZopePageTemplate):
return ZopePageTemplate.pt_upload(self, REQUEST, file) return ZopePageTemplate.pt_upload(self, REQUEST, file)
security.declareProtected('Change Page Templates', 'pt_edit')
def pt_edit(self, text, content_type):
if content_type:
self.content_type = str(content_type)
if hasattr(text, 'read'):
text = text.read()
self.write(text)
security.declareProtected('Change Page Templates', 'doSettings') security.declareProtected('Change Page Templates', 'doSettings')
def doSettings(self, REQUEST, title, ooo_stylesheet): def doSettings(self, REQUEST, title, ooo_stylesheet):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment