[Zope-Checkins] CVS: Zope/lib/python/Products/ZReST - ZReST.py:1.6.12.7

Andreas Jung andreas at andreas-jung.com
Wed Aug 4 07:36:00 EDT 2004


Update of /cvs-repository/Zope/lib/python/Products/ZReST
In directory cvs.zope.org:/tmp/cvs-serv2155/lib/python/Products/ZReST

Modified Files:
      Tag: Zope-2_7-branch
	ZReST.py 
Log Message:

     - ZReST: the charset used in the rendered HTML was not set to the 
       corresponding output_encoding property of the ZReST instance. In addition
       changing the encodings through the Properties tab did not re-render 
       the HTML.


=== Zope/lib/python/Products/ZReST/ZReST.py 1.6.12.6 => 1.6.12.7 ===
--- Zope/lib/python/Products/ZReST/ZReST.py:1.6.12.6	Fri May 14 12:54:57 2004
+++ Zope/lib/python/Products/ZReST/ZReST.py	Wed Aug  4 07:35:30 2004
@@ -196,11 +196,11 @@
         # remember warnings
         pub.settings.warning_stream = Warnings()
 
-        # input
         pub.source = docutils.io.StringInput(
             source=self.source, encoding=self.input_encoding)
 
         # output - not that it's needed
+        pub.settings.output_encoding = self.output_encoding
         pub.destination = docutils.io.StringOutput(
             encoding=self.output_encoding)
 
@@ -281,6 +281,13 @@
         return ZReST.inheritedAttribute('manage_historyCompare')(
             self, rev1, rev2, REQUEST,
             historyComparisonResults=html_diff(rev1.source, rev2.source))
+
+    def manage_editProperties(self, REQUEST):
+        """ re-render the page after changing the properties (encodings!!!) """
+        result = PropertyManager.manage_editProperties(self, REQUEST)        
+        self.render()
+        return result
+
 
 InitializeClass(ZReST)
 modulesecurity.apply(globals())



More information about the Zope-Checkins mailing list