def do_striptags(value):
 if hasattr(value, '__html__'):
  value = value.__html__()
 return Markup(text_type(value)).striptags()

def do_striptags ( value ) : if hasattr ( value , '__html__' ) : value = value . __html__ ( ) return Markup ( text_type ( value ) ) . striptags ( )
strip sgml/xml tags and replace adjacent whitespace by one space .