From: Ben Darnell Date: Fri, 17 Sep 2010 21:46:43 +0000 (-0700) Subject: Make xhtml_escape available in the template namespace under its own name X-Git-Tag: v1.2.0~124 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81a3eae5e63eb48f5b42941e5394d58cd7e0f994;p=thirdparty%2Ftornado.git Make xhtml_escape available in the template namespace under its own name in addition to "escape". --- diff --git a/tornado/template.py b/tornado/template.py index bea95bb66..14cb967e2 100644 --- a/tornado/template.py +++ b/tornado/template.py @@ -115,6 +115,7 @@ class Template(object): """Generate this template with the given arguments.""" namespace = { "escape": escape.xhtml_escape, + "xhtml_escape": escape.xhtml_escape, "url_escape": escape.url_escape, "json_encode": escape.json_encode, "squeeze": escape.squeeze, diff --git a/website/templates/documentation.txt b/website/templates/documentation.txt index 30da201c7..45cab52a1 100644 --- a/website/templates/documentation.txt +++ b/website/templates/documentation.txt @@ -268,6 +268,7 @@ module directly outside of a `RequestHandler` many of these entries are not present). * `escape`: alias for `tornado.escape.xhtml_escape` + * `xhtml_escape`: alias for `tornado.escape.xhtml_escape` * `url_escape`: alias for `tornado.escape.url_escape` * `json_encode`: alias for `tornado.escape.json_encode` * `squeeze`: alias for `tornado.escape.squeeze`