Use strutils.native before sending data to jsbeautifier

This commit is contained in:
dufferzafar 2016-07-27 04:26:26 -07:00
parent 821413349e
commit 583827ad3f
1 changed files with 1 additions and 1 deletions

View File

@ -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)