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.
This commit is contained in:
parent
59d2088498
commit
212e9a017d
1 changed files with 1 additions and 1 deletions
|
|
@ -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 "")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue