Fixed issue #56: Template() now accepts an "escape" argument.
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()`.
Showing
Please
register
or
sign in
to comment