defunkt/pystache — Issue #56: Change "disable_escape" to "escape" in Template.__init__()
Author: cjerdonek
Created: 2011-12-20 17:01:57+00:00
State: open

The constructor [`Template.__init__()`](https://github.com/defunkt/pystache/blob/e2ce832b01e78e1bb420e70315468aa19b2063ca/pystache/template.py#L63) should accept an optional `escape` function argument instead of the boolean `disable_escape`. This is more natural.

Examples:

* Users wanting no escaping can pass `lambda s: s`.
* Non-markupsafe users wanting double-quotes escaped can pass `lambda s: cgi.escape(s, True)`.
* And similarly for markupsafe users wanting something other than [`markupsafe.escape()`](https://github.com/mitsuhiko/markupsafe/blob/98caea1496846935dd60a0e170c401e91ce9029a/markupsafe/_native.py#L14).