@library.filter
def simple_urlize(value):
 validate_url = URLValidator()
 try:
  validate_url(value)
 except ValidationError:
  return value
 return jinja2.Markup(('<a href="%s">%s</a>' % (value, value)))

@ library . filter def simple_urlize ( value ) : validate_url = URLValidator ( ) try : validate_url ( value ) except ValidationError : return value return jinja2 . Markup ( ( '<a href="%s">%s</a>' % ( value , value ) ) )
converts a string to a clickable link .