From e77d63294e12982d4836987e28e12db04b16093e Mon Sep 17 00:00:00 2001 From: shortcutme Date: Mon, 18 Mar 2019 01:06:04 +0100 Subject: [PATCH] Fix config page --- plugins/UiConfig/UiConfigPlugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/UiConfig/UiConfigPlugin.py b/plugins/UiConfig/UiConfigPlugin.py index a30f083f..ae9e6950 100644 --- a/plugins/UiConfig/UiConfigPlugin.py +++ b/plugins/UiConfig/UiConfigPlugin.py @@ -42,11 +42,11 @@ class UiRequestPlugin(object): DebugMedia.merge(file_path) if file_path.endswith("js"): - data = _.translateData(open(file_path).read(), mode="js") + data = _.translateData(open(file_path).read(), mode="js").encode("utf8") elif file_path.endswith("html"): - data = _.translateData(open(file_path).read(), mode="html") + data = _.translateData(open(file_path).read(), mode="html").encode("utf8") else: - data = open(file_path).read() + data = open(file_path, "rb").read() return self.actionFile(file_path, file_obj=io.BytesIO(data), file_size=len(data)) else: