]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Make xhtml_escape available in the template namespace under its own name
authorBen Darnell <ben@bendarnell.com>
Fri, 17 Sep 2010 21:46:43 +0000 (14:46 -0700)
committerBen Darnell <ben@bendarnell.com>
Fri, 17 Sep 2010 21:46:43 +0000 (14:46 -0700)
in addition to "escape".

tornado/template.py
website/templates/documentation.txt

index bea95bb66cf8b4186ce15230bd79599dc83d8c48..14cb967e2da81350b96a9a3882654e8add6461bf 100644 (file)
@@ -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,
index 30da201c70c646df40280b4b8304528f0d499517..45cab52a11182ce901337c17ec423201835c5e56 100644 (file)
@@ -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`