MCPcopy Index your code
hub / github.com/nodejs/node / escape

Method escape

tools/inspector_protocol/markupsafe/__init__.py:157–165  ·  view source on GitHub ↗

Escape the string. Works like :func:`escape` with the difference that for subclasses of :class:`Markup` this function would return the correct subclass.

(cls, s)

Source from the content-addressed store, hash-verified

155
156 @classmethod
157 def escape(cls, s):
158 """Escape the string. Works like :func:`escape` with the difference
159 that for subclasses of :class:`Markup` this function would return the
160 correct subclass.
161 """
162 rv = escape(s)
163 if rv.__class__ is not cls:
164 return cls(rv)
165 return rv
166
167 def make_wrapper(name):
168 orig = getattr(text_type, name)

Callers 15

__add__Method · 0.95
__radd__Method · 0.95
partitionMethod · 0.95
rpartitionMethod · 0.95
CheckEndMethod · 0.45
_UpdateConstructorMethod · 0.45
_IsTypeFunction · 0.45
_MarkupEscapeHelperClass · 0.45
lexer.pyFile · 0.45
ExpandXcodeVariablesFunction · 0.45
DefineFunction · 0.45

Calls 1

escapeFunction · 0.90

Tested by 3

assert_fileFunction · 0.36
IsFailureOutputMethod · 0.36
IsFailureOutputMethod · 0.36