class_docstr: A string that is ready to be safely inserted into an HTML or XML
  document, either because it was escaped or because it was marked
  safe.
  
  Passing an object to the constructor converts it to text and wraps
  it to mark it safe without escaping. To escape the text, use the
  :meth:`escape` class method instead.
  
  >>> Markup('Hello, <em>World</em>!')
  Markup('Hello, <em>World</em>!')
  >>> Markup(42)
  Markup('42')
  >>> Markup.escape('Hello, <em>World</em>!')
  Markup('Hello &lt;em&gt;World&lt;/em&gt;!')
  
  This implements the ``__html__()`` interface that some frameworks
  use. Passing an object that implements ``__html__()`` will wrap the
  output of that method, marking it safe.
  
  >>> class Foo:
  ...     def __html__(self):
  ...         return '<a href="/foo">foo</a>'
  ...
  >>> Markup(Foo())
  Markup('<a href="/foo">foo</a>')
  
  This is a subclass of the text type (``str`` in Python 3,
  ``unicode`` in Python 2). It has the same methods as that type, but
  all methods escape their arguments and return a ``Markup`` instance.
  
  >>> Markup('<em>%s</em>') % 'foo & bar'
  Markup('<em>foo &amp; bar</em>')
  >>> Markup('<em>Hello</em> ') + '<foo>'
  Markup('<em>Hello</em> &lt;foo&gt;')
class_docstr_tok: ["A","string","that","is","ready","to","be","safely","inserted","into","an","HTML","or","XML","document",",","either","because","it","was","escaped","or","because","it","was","marked","safe",".","Passing","an","object","to","the","constructor","converts","it","to","text","and","wraps","it","to","mark","it","safe","without","escaping",".","To","escape","the","text",",","use","the",":","meth",":","`","escape","`","class","method","instead",".",">",">",">","Markup","(","'Hello",",","<","em",">","World","<","\/em",">","!","'",")","Markup","(","'Hello",",","<","em",">","World","<","\/em",">","!","'",")",">",">",">","Markup","(","42",")","Markup","(","'42","'",")",">",">",">","Markup.escape","(","'Hello",",","<","em",">","World","<","\/em",">","!","'",")","Markup","(","'Hello","&","lt",";","em","&","gt",";","World","&","lt",";","\/em","&","gt",";","!","'",")","This","implements","the","``","__html__","(",")","``","interface","that","some","frameworks","use",".","Passing","an","object","that","implements","``","__html__","(",")","``","will","wrap","the","output","of","that","method",",","marking","it","safe",".",">",">",">","class","Foo",":","...","def","__html__","(","self",")",":","...","return","'","<","a","href=","''","\/foo","''",">","foo","<","\/a",">","'","...",">",">",">","Markup","(","Foo","(",")",")","Markup","(","'","<","a","href=","''","\/foo","''",">","foo","<","\/a",">","'",")","This","is","a","subclass","of","the","text","type","(","``","str","``","in","Python","3",",","``","unicode","``","in","Python","2",")",".","It","has","the","same","methods","as","that","type",",","but","all","methods","escape","their","arguments","and","return","a","``","Markup","``","instance",".",">",">",">","Markup","(","'","<","em",">","%","s","<","\/em",">","'",")","%","'foo","&","bar'","Markup","(","'","<","em",">","foo","&","amp",";","bar","<","\/em",">","'",")",">",">",">","Markup","(","'","<","em",">","Hello","<","\/em",">","'",")","+","'","<","foo",">","'","Markup","(","'","<","em",">","Hello","<","\/em",">","&","lt",";","foo","&","gt",";","'",")"]
docstr: :meth:`unescape` the markup, remove tags, and normalize
  whitespace to single spaces.
  
  >>> Markup('Main &raquo;        <em>About</em>').striptags()
  'Main » About'
docstr_tok: [":","meth",":","`","unescape","`","the","markup",",","remove","tags",",","and","normalize","whitespace","to","single","spaces",".",">",">",">","Markup","(","'Main","&","raquo",";","<","em",">","About","<","\/em",">","'",")",".striptags","(",")","'Main","\u00bb","About","'"]
code: def striptags(self):
      """:meth:`unescape` the markup, remove tags, and normalize
      whitespace to single spaces.
  
      >>> Markup('Main &raquo;\t<em>About</em>').striptags()
      'Main » About'
      """
      stripped = " ".join(_striptags_re.sub("", self).split())
      return Markup(stripped).unescape()
  
imports: import re
  import string
  from ._compat import int_types
  from ._compat import iteritems
  from ._compat import Mapping
  from ._compat import PY2
  from ._compat import string_types
  from ._compat import text_type
  from ._compat import unichr
label_desc: Use image node_id 13 for calling the Markup obj's underlying member method code with example usage: obj.striptags() and returns: Markup