test_examples.py
2.85 KB
-
Fixed issue #56: Template() now accepts an "escape" argument. · f2108401
From the issue: The constructor `Template.__init__()` should accept an optional `escape` function argument instead of the boolean `disable_escape`. This is more natural. Examples: * Users wanting to disable escaping can pass `lambda s: s`. * Non-markupsafe users wanting double-quotes escaped can pass `lambda s: cgi.escape(s, True)`. The cgi.escape() function doesn't escape double-quotes by default. * Similarly, markupsafe users can specify an alternative to `markupsafe.escape()`.
Chris Jerdonek committed