Commit eaf92072 authored by 's avatar

- made sure getConfiguration().default_zpublisher_encoding is set correctly

parent a904f4f1
......@@ -11,6 +11,8 @@ http://docs.zope.org/zope2/releases/.
Bugs Fixed
++++++++++
- Made sure getConfiguration().default_zpublisher_encoding is set correctly.
- LP #713253: Prevent publication of acquired attributes, where the acquired
object does not have a docstring.
......
......@@ -11,7 +11,6 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Datatypes for the Zope schema for use with ZConfig."""
import os
......@@ -239,6 +238,7 @@ def default_zpublisher_encoding(value):
Converters.default_encoding = value
HTTPRequest.default_encoding = value
HTTPResponse.default_encoding = value
return value
class DBTab:
"""A Zope database configuration, similar in purpose to /etc/fstab.
......
......@@ -11,7 +11,6 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Test that the Zope schema can be loaded."""
import os
......@@ -221,5 +220,18 @@ class StartupTestCase(unittest.TestCase):
""")
self.assertEqual(conf.max_conflict_retries, 15)
def test_default_zpublisher_encoding(self):
conf, dummy = self.load_config_text("""\
instancehome <<INSTANCE_HOME>>
""")
self.assertEqual(conf.default_zpublisher_encoding, 'iso-8859-15')
conf, dummy = self.load_config_text("""\
instancehome <<INSTANCE_HOME>>
default-zpublisher-encoding utf-8
""")
self.assertEqual(conf.default_zpublisher_encoding, 'utf-8')
def test_suite():
return unittest.makeSuite(StartupTestCase)
......@@ -877,12 +877,13 @@
<section type="zoperunner" name="*" attribute="runner"/>
<key name="default-zpublisher-encoding" datatype=".default_zpublisher_encoding">
<key name="default-zpublisher-encoding"
datatype=".default_zpublisher_encoding"
default="iso-8859-15">
<description>
This key controls what character set is used to encode unicode
data that reaches ZPublisher without any other specified encoding.
</description>
<metadefault>iso-8859-15</metadefault>
</key>
<abstracttype name="zope.product.base">
......
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