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

Function htmlUnescape

lib/core/convert.py:83–105  ·  view source on GitHub ↗

Returns HTML unescaped value >>> htmlUnescape('a<b') == 'a >> htmlUnescape('a<b') == 'a >> htmlUnescape('foobar') == 'foobar' True >>> htmlUnescape('foobar') == 'foobar' True >

(value)

Source from the content-addressed store, hash-verified

81 return retVal
82
83def htmlUnescape(value):
84 """
85 Returns HTML unescaped value
86
87 >>> htmlUnescape('a&lt;b') == 'a<b'
88 True
89 >>> htmlUnescape('a&lt;b') == 'a<b'
90 True
91 >>> htmlUnescape('&#x66;&#x6f;&#x6f;&#x62;&#x61;&#x72;') == 'foobar'
92 True
93 >>> htmlUnescape('&#102;&#111;&#111;&#98;&#97;&#114;') == 'foobar'
94 True
95 >>> htmlUnescape('&copy;&euro;') == htmlUnescape('&#xA9;&#x20AC;')
96 True
97 """
98
99 if value and isinstance(value, six.string_types):
100 if six.PY3:
101 import html
102 return html.unescape(value)
103 else:
104 return html_parser.HTMLParser().unescape(value)
105 return value
106
107def singleTimeWarnMessage(message): # Cross-referenced function
108 sys.stdout.write(message)

Callers 6

crawlThreadFunction · 0.90
getFilteredPageContentFunction · 0.90
extractErrorMessageFunction · 0.90
findPageFormsFunction · 0.90
_oneShotUnionUseFunction · 0.90
_oneShotErrorUseFunction · 0.90

Calls 1

unescapeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…