From 2e62f3c7d4ab216febec4df72a7622bdf6f5ca2b Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Fri, 27 Dec 2024 16:54:38 +0000 Subject: [PATCH] retain newline in body but replace \r --- core/views/expo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/views/expo.py b/core/views/expo.py index f6cd76e..a151a4d 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -476,7 +476,7 @@ def editexpopage(request, path): bodyargs = "" postbody = "\n" body = pageform.cleaned_data["html"] - body = body.replace("\r", "") + body = body.replace("\r", "\n") result = f"{preheader}{head}{postheader}\n{body}{postbody}" if not filefound or result != html: # Check if content changed at all