diff --git a/mitmproxy/contentviews.py b/mitmproxy/contentviews.py index 68d3d9590..304b52411 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)