From 212e9a017d7d5b887404f2f7141cbe02896bebc7 Mon Sep 17 00:00:00 2001 From: lichenblankie Date: Thu, 26 Mar 2026 22:00:27 -0700 Subject: [PATCH] fixed navbar disappearing on save Browser textarea submissions convert \n to \r\n, causing the template comparison against DEFAULT_TEMPLATE to always fail. This saved the bare skeleton as a custom template, overriding the default navbar. --- handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 "")