[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py fix

Andreas Jung andreas at andreas-jung.com
Sat Dec 23 08:08:06 EST 2006


Log message for revision 71645:
  fix
  

Changed:
  U   Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py

-=-
Modified: Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py
===================================================================
--- Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py	2006-12-23 12:51:16 UTC (rev 71644)
+++ Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py	2006-12-23 13:08:06 UTC (rev 71645)
@@ -337,6 +337,7 @@
     security.declareProtected(change_page_templates, 'PUT')
     def PUT(self, REQUEST, RESPONSE):
         """ Handle HTTP PUT requests """
+
         self.dav__init(REQUEST, RESPONSE)
         self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
         text = REQUEST.get('BODY', '')
@@ -407,7 +408,7 @@
         # Perform on-the-fly migration to unicode.
         # Perhaps it might be work with the 'generation' module here?
         if not isinstance(state['_text'], unicode):
-            text, encoding = convertToUnicode(state['_text'], state['content_type'])
+            text, encoding = convertToUnicode(state['_text'], state.get('content_type', 'text/html'))
             state['_text'] = text
             state['output_encoding'] = encoding
         self.__dict__.update(state) 



More information about the Zope-Checkins mailing list