MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / unescape_charref

Function unescape_charref

thirdparty/clientform/clientform.py:252–262  ·  view source on GitHub ↗
(data, encoding)

Source from the content-addressed store, hash-verified

250 return re.sub(r"&#?[A-Za-z0-9]+?;", replace_entities, data)
251
252def unescape_charref(data, encoding):
253 name, base = data, 10
254 if name.startswith("x"):
255 name, base= name[1:], 16
256 elif not name.isdigit():
257 base = 16
258
259 try:
260 return _unichr(int(name, base))
261 except:
262 return data
263
264def get_entitydefs():
265 from codecs import latin_1_decode

Callers 4

replace_entitiesFunction · 0.85
get_entitydefsFunction · 0.85
handle_charrefMethod · 0.85
convert_charrefMethod · 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…