diff --git a/src/Ui/UiRequest.py b/src/Ui/UiRequest.py index 161e4d78..a2f1be4c 100644 --- a/src/Ui/UiRequest.py +++ b/src/Ui/UiRequest.py @@ -245,8 +245,10 @@ class UiRequest(object): # Renders a template def render(self, template_path, *args, **kwargs): - template = open(template_path).read().decode("utf8") - return template.format(**kwargs).encode("utf8") + template = open(template_path).read() + for key, val in kwargs.items(): + template = template.replace("{%s}" % key, "%s" % val) + return template # - Actions -