File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1892,3 +1892,15 @@ def filterListValue(value, regex):
18921892 return retVal
18931893 else :
18941894 return value
1895+
1896+ def unicodeToSafeHTMLValue (value ):
1897+ """
1898+ Returns HTML representation of unicode
1899+ string value safe for sending over HTTP(s)
1900+ """
1901+ retVal = value
1902+ if value :
1903+ for char in value :
1904+ if ord (char ) > 127 :
1905+ retVal = retVal .replace (char , "&#%d;" % ord (char ))
1906+ return retVal
Original file line number Diff line number Diff line change 2222from lib .core .common import clearConsoleLine
2323from lib .core .common import getCurrentThreadData
2424from lib .core .common import getFilteredPageContent
25+ from lib .core .common import unicodeToSafeHTMLValue
2526from lib .core .common import getUnicode
2627from lib .core .common import logHTTPTraffic
2728from lib .core .common import readInput
@@ -150,6 +151,11 @@ def getPage(**kwargs):
150151 for key , item in auxHeaders .items ():
151152 headers [key ] = item
152153
154+ for key , item in headers .items ():
155+ headers [key ] = unicodeToSafeHTMLValue (item )
156+
157+ post = unicodeToSafeHTMLValue (post )
158+
153159 if method :
154160 req = MethodRequest (url , post , headers )
155161 req .set_method (method )
You can’t perform that action at this time.
0 commit comments