2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-16 11:07:15 +00:00

retain newline in body but replace \r

This commit is contained in:
2024-12-27 16:54:38 +00:00
parent 2b97c8f783
commit 2e62f3c7d4

View File

@@ -476,7 +476,7 @@ def editexpopage(request, path):
bodyargs = ""
postbody = "</html>\n"
body = pageform.cleaned_data["html"]
body = body.replace("\r", "")
body = body.replace("\r", "\n")
result = f"{preheader}<head{headerargs}>{head}</head>{postheader}<body{bodyargs}>\n{body}</body>{postbody}"
if not filefound or result != html: # Check if content changed at all