mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-05-18 21:13:37 +01:00
retain newline in body but replace \r
This commit is contained in:
+1
-1
@@ -476,7 +476,7 @@ def editexpopage(request, path):
|
|||||||
bodyargs = ""
|
bodyargs = ""
|
||||||
postbody = "</html>\n"
|
postbody = "</html>\n"
|
||||||
body = pageform.cleaned_data["html"]
|
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}"
|
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
|
if not filefound or result != html: # Check if content changed at all
|
||||||
|
|||||||
Reference in New Issue
Block a user