Fix config page

This commit is contained in:
shortcutme 2019-03-18 01:06:04 +01:00
parent 82c55ba038
commit e77d63294e
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 3 additions and 3 deletions

View File

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