fix #155: xss prevention

This commit is contained in:
httprunner
2018-05-31 14:41:40 +08:00
parent 55467c2b9f
commit 2049e8fc1f

View File

@@ -126,7 +126,7 @@ def stringify_body(meta_data, request_or_response):
b64encode(body).decode('utf-8')
)
else:
body = body.decode("utf-8")
body = escape(body.decode("utf-8"))
except UnicodeDecodeError:
pass