MCPcopy Index your code
hub / github.com/clips/pattern / _xmlescape

Function _xmlescape

pattern/web/feed/feedparser.py:189–195  ·  view source on GitHub ↗
(data,entities={})

Source from the content-addressed store, hash-verified

187except ImportError:
188 _XML_AVAILABLE = 0
189 def _xmlescape(data,entities={}):
190 data = data.replace('&', '&')
191 data = data.replace('>', '>')
192 data = data.replace('<', '&lt;')
193 for char, entity in entities:
194 data = data.replace(char, entity)
195 return data
196else:
197 try:
198 xml.sax.make_parser(PREFERRED_XML_PARSERS) # test for valid parsers

Callers 3

handle_dataMethod · 0.85
parse_declarationMethod · 0.85
strattrsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…