From 63d6dd4979c8c813172fb78fae30c72ecba1c2ed Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Thu, 5 Apr 2012 07:44:34 -0700 Subject: Python 3 support: use html module instead of cgi.escape(). Python 3.2 deprecates cgi.escape() and introduces the html module in its place. --- pystache/renderer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pystache/renderer.py') diff --git a/pystache/renderer.py b/pystache/renderer.py index 5bd2a3f..ef6124a 100644 --- a/pystache/renderer.py +++ b/pystache/renderer.py @@ -64,10 +64,10 @@ class Renderer(object): this class will only pass it unicode strings. The constructor assigns this function to the constructed instance's escape() method. - The argument defaults to `cgi.escape(s, quote=True)`. To - disable escaping entirely, one can pass `lambda u: u` as the - escape function, for example. One may also wish to consider - using markupsafe's escape function: markupsafe.escape(). + To disable escaping entirely, one can pass `lambda u: u` + as the escape function, for example. One may also wish to + consider using markupsafe's escape function: markupsafe.escape(). + This argument defaults to the package default. file_encoding: the name of the default encoding to use when reading template files. All templates are converted to unicode prior -- cgit v1.2.1