code: def do_striptags(value):
      
      if hasattr(value, '__html__'):
          value = value.__html__()
      return Markup(unicode(value)).striptags()
docs: Strip SGML/XML tags and replace adjacent whitespace by one space.