diff --git a/handlers.py b/handlers.py index 2034d3f..4eaab1e 100644 --- a/handlers.py +++ b/handlers.py @@ -525,7 +525,7 @@ def handle_style_form(msg=""): def handle_style_submit(body): - template = body.get("template", [""])[0] + template = body.get("template", [""])[0].replace("\r\n", "\n").replace("\r", "\n") name = body.get("site_name", ["tinyweb"])[0].strip() sharing = "1" if body.get("sharing_enabled") else "0" set_setting("custom_template", template if template.strip() != DEFAULT_TEMPLATE.strip() else "")