Commit b7ae0e0a authored by Yoshinori Okuji's avatar Yoshinori Okuji

Get back the original StringIO in PageTemplate, because OOoTemplate does not...

Get back the original StringIO in PageTemplate, because OOoTemplate does not want response-aware encoding.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19257 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 674b388e
......@@ -33,6 +33,7 @@ from Products.CMFCore.FSPageTemplate import FSPageTemplate
from Products.CMFCore.DirectoryView import registerFileExtension, registerMetaType
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from TAL.TALInterpreter import FasterStringIO
from Products.ERP5Type import PropertySheet
from urllib import quote
from Globals import InitializeClass, DTMLFile, get_request
......@@ -155,6 +156,13 @@ class OOoTemplate(ZopePageTemplate):
# we store the attachments of the uploaded document
self.OLE_documents_zipstring = None
# Re-define StringIO with the original one, because iHotfix may
# monkey patch it.
# XXX it might be better to simply disable iHotfix overriding
# StringIO.
def StringIO(self):
return FasterStringIO()
def pt_upload(self, REQUEST, file=''):
"""Replace the document with the text in file."""
if SUPPORTS_WEBDAV_LOCKS and self.wl_isLocked():
......
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