mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-31 07:36:06 +00:00
Minor patch
This commit is contained in:
parent
eb5c1e0aa2
commit
9b3ed89fd6
3 changed files with 8 additions and 4 deletions
|
|
@ -85,6 +85,10 @@ def htmlUnescape(value):
|
|||
|
||||
>>> htmlUnescape('a<b') == 'a<b'
|
||||
True
|
||||
>>> htmlUnescape('a<b') == 'a<b'
|
||||
True
|
||||
>>> htmlUnescape('foobar') == 'foobar'
|
||||
True
|
||||
"""
|
||||
|
||||
retVal = value
|
||||
|
|
@ -95,7 +99,7 @@ def htmlUnescape(value):
|
|||
retVal = retVal.replace(code, value)
|
||||
|
||||
try:
|
||||
retVal = re.sub(r"&#x([^ ;]+);", lambda match: _unichr(int(match.group(1), 16)), retVal)
|
||||
retVal = re.sub(r"&#x([0-9a-fA-F]+);", lambda match: _unichr(int(match.group(1), 16)), retVal)
|
||||
except (ValueError, OverflowError):
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue