Use strutils.native before sending data to jsbeautifier
This commit is contained in:
parent
821413349e
commit
583827ad3f
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue