[Zope-Checkins] SVN: Zope/trunk/ - ZReST: the charset used in the
rendered HTML was not set to the
Andreas Jung
andreas at andreas-jung.com
Wed Aug 4 07:36:16 EDT 2004
Log message for revision 26902:
- 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.
Changed:
U Zope/trunk/doc/CHANGES.txt
U Zope/trunk/lib/python/Products/ZReST/ZReST.py
-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt 2004-08-04 10:10:03 UTC (rev 26901)
+++ Zope/trunk/doc/CHANGES.txt 2004-08-04 11:36:16 UTC (rev 26902)
@@ -142,6 +142,11 @@
Bugs fixed
+ - 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.
+
- Collector #1234: an exception triple passed to LOG() was not
propagated properly to the logging module of Python
Modified: Zope/trunk/lib/python/Products/ZReST/ZReST.py
===================================================================
--- Zope/trunk/lib/python/Products/ZReST/ZReST.py 2004-08-04 10:10:03 UTC (rev 26901)
+++ Zope/trunk/lib/python/Products/ZReST/ZReST.py 2004-08-04 11:36:16 UTC (rev 26902)
@@ -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)
@@ -282,6 +282,13 @@
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