summaryrefslogtreecommitdiff
path: root/pystache/renderer.py
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2011-12-23 17:03:19 -0800
committerChris Jerdonek <chris.jerdonek@gmail.com>2011-12-23 17:03:19 -0800
commita49fa8cb9ddc5240f3c0dc85cd1a7a3216bf7c01 (patch)
tree51977e419b56f530a8e97a8fd8e3e81065952e21 /pystache/renderer.py
parent79cc6c94c1f6eb1f946203f5822cc443cdd70e67 (diff)
downloadpystache-a49fa8cb9ddc5240f3c0dc85cd1a7a3216bf7c01.tar.gz
The Renderer's default Loader now inherits the decode_errors argument.
Diffstat (limited to 'pystache/renderer.py')
-rw-r--r--pystache/renderer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pystache/renderer.py b/pystache/renderer.py
index 5939a85..a7a476e 100644
--- a/pystache/renderer.py
+++ b/pystache/renderer.py
@@ -55,7 +55,8 @@ class Renderer(object):
the method should either return None (as dict.get() does) or
raise an exception.
Defaults to constructing a Loader instance with
- default_encoding passed as the encoding argument.
+ default_encoding and decode_errors passed as the encoding and
+ decode_errors arguments, respectively.
output_encoding: the encoding to use when rendering to a string.
The argument should be the name of an encoding as a string, for
@@ -93,7 +94,7 @@ class Renderer(object):
escape = markupsafe.escape if markupsafe else cgi.escape
if loader is None:
- loader = Loader(encoding=default_encoding)
+ loader = Loader(encoding=default_encoding, decode_errors=decode_errors)
literal = markupsafe.Markup if markupsafe else unicode