From 583827ad3f21a1da0c424d17c434c6f63f942f8e Mon Sep 17 00:00:00 2001 From: dufferzafar Date: Wed, 27 Jul 2016 04:26:26 -0700 Subject: Use strutils.native before sending data to jsbeautifier --- mitmproxy/contentviews.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3