{{{text}}} is returned without field formatting but html intact

This commit is contained in:
Damien Elmes 2010-11-29 22:40:20 +09:00
parent da1cfa52b1
commit dfb21a0f71

View file

@ -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("^<span.+?>(.*)</span>", "\\1", raw)
@modifier('!')
def render_comment(self, tag_name=None, context=None):