def linkify_escape(text):
 def linkify(match):
  return u'<a href="{0}">{0}</a>'.format(match.group(0))
 return URL_RE.sub(linkify, unicode(jinja2.escape(text)))

def linkify_escape ( text ) : def linkify ( match ) : return u'<a href="{0}">{0}</a>' . format ( match . group ( 0 ) ) return URL_RE . sub ( linkify , unicode ( jinja2 . escape ( text ) ) )
linkifies plain text .