mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
minor refactoring
This commit is contained in:
parent
81bd9a201b
commit
41b60b26fc
15 changed files with 39 additions and 39 deletions
|
|
@ -152,6 +152,9 @@ def htmlescape(value):
|
|||
return value.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"').replace("'", ''').replace(' ', ' ')
|
||||
|
||||
def htmlunescape(value):
|
||||
retVal = value.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"').replace(''', "'").replace(' ', ' ')
|
||||
retVal = re.sub('&#(\d+);', lambda x: unichr(int(x.group(1))), retVal)
|
||||
retVal = value
|
||||
if value and isinstance(value, basestring):
|
||||
if '&' in retVal:
|
||||
retVal = retVal.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"').replace(' ', ' ')
|
||||
retVal = re.sub('&#(\d+);', lambda x: unichr(int(x.group(1))), retVal)
|
||||
return retVal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue