parameters: (cls, s)
return_statement: return rv
docstring: Escape the string.  Works like :func:`escape` with the difference
          that for subclasses of :class:`Markup` this function would return the
          correct subclass.
docstring_summary: Escape the string.  Works like :func:`escape` with the difference
          that for subclasses of :class:`Markup` this function would return the
          correct subclass.
docstring_tokens: Escape the string . Works like : func : escape with the difference that for subclasses of : class : Markup this function would return the correct subclass .
function: def escape(cls, s):
          """Escape the string.  Works like :func:`escape` with the difference
          that for subclasses of :class:`Markup` this function would return the
          correct subclass.
          """
          rv = escape(s)
          if rv.__class__ is not cls:
              return cls(rv)
          return rv
function_tokens: def escape ( cls , s ) : rv = escape ( s ) if rv . __class__ is not cls : return cls ( rv ) return rv