mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-15 12:19:03 +00:00
"patch" for a problem reported by black zero (v = self._sslobj.write(data)...UnicodeError)
This commit is contained in:
@@ -1892,3 +1892,15 @@ def filterListValue(value, regex):
|
||||
return retVal
|
||||
else:
|
||||
return value
|
||||
|
||||
def unicodeToSafeHTMLValue(value):
|
||||
"""
|
||||
Returns HTML representation of unicode
|
||||
string value safe for sending over HTTP(s)
|
||||
"""
|
||||
retVal = value
|
||||
if value:
|
||||
for char in value:
|
||||
if ord(char) > 127:
|
||||
retVal = retVal.replace(char, "&#%d;" % ord(char))
|
||||
return retVal
|
||||
|
||||
Reference in New Issue
Block a user