aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordufferzafar <dufferzafar0@gmail.com>2016-07-27 04:26:26 -0700
committerdufferzafar <dufferzafar0@gmail.com>2016-07-27 04:34:51 -0700
commit583827ad3f21a1da0c424d17c434c6f63f942f8e (patch)
treed8ed95ee11d3d94456fb8b6bbfd14558ba8e8b28
parent821413349ebf6c2330d8abfd23e8d03894e77e47 (diff)
downloadmitmproxy-583827ad3f21a1da0c424d17c434c6f63f942f8e.tar.gz
mitmproxy-583827ad3f21a1da0c424d17c434c6f63f942f8e.tar.bz2
mitmproxy-583827ad3f21a1da0c424d17c434c6f63f942f8e.zip
Use strutils.native before sending data to jsbeautifier
-rw-r--r--mitmproxy/contentviews.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mitmproxy/contentviews.py b/mitmproxy/contentviews.py
index 68d3d959..304b5241 100644
--- a/mitmproxy/contentviews.py
+++ b/mitmproxy/contentviews.py
@@ -389,7 +389,7 @@ class ViewJavaScript(View):
def __call__(self, data, **metadata):
opts = jsbeautifier.default_options()
opts.indent_size = 2
- res = jsbeautifier.beautify(data.decode(), opts)
+ res = jsbeautifier.beautify(strutils.native(data), opts)
return "JavaScript", format_text(res)