def htsafe(text):
 text = smart_unicode(text)
 safe_string = smart_unicode(sanitizer.clean_html(text))
 return Markup(safe_string)

def htsafe ( text ) : text = smart_unicode ( text ) safe_string = smart_unicode ( sanitizer . clean_html ( text ) ) return Markup ( safe_string )
strip all unsafe tags 1 .