From dfb21a0f711dd737a4fa1602af2df1921f3fba0b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 29 Nov 2010 22:40:20 +0900 Subject: [PATCH] {{{text}}} is returned without field formatting but html intact --- pystache/template.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pystache/template.py b/pystache/template.py index 409bd0bae..a717e3ba9 100644 --- a/pystache/template.py +++ b/pystache/template.py @@ -120,13 +120,12 @@ class Template(object): return template @modifier('{') - @modifier('&') def render_tag(self, tag_name, context): """Given a tag name and context, finds, escapes, and renders the tag.""" raw = get_or_attr(context, tag_name, '') if not raw and raw is not 0: return '' - return cgi.escape(unicode(raw)) + return re.sub("^(.*)", "\\1", raw) @modifier('!') def render_comment(self, tag_name=None, context=None):