From 18d45e5a920997f45d5f527849c2f8bbb4546f93 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Tue, 23 May 2023 03:27:30 +0400 Subject: [PATCH] Removed replacing of \\n with \n. --- internal/http/handlers.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/internal/http/handlers.go b/internal/http/handlers.go index 03e427f..8470291 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -49,9 +49,6 @@ func (h *Handlers) Mindflow(w http.ResponseWriter, r *http.Request) { if err != nil { return } - for _, entry := range posts { - entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n") - } categories, err := h.mindflowDB.Categories() if err != nil { @@ -68,9 +65,6 @@ func (h *Handlers) MindflowAdmin(w http.ResponseWriter, r *http.Request) { log.Println(err) return } - for _, entry := range posts { - entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n") - } categories, err := h.mindflowDB.Categories() if err != nil { @@ -165,10 +159,6 @@ func (h *Handlers) RSS(w http.ResponseWriter, r *http.Request) { return } - for _, entry := range posts { - entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n") - } - web.RSS(r.URL.Scheme+"://"+r.Host, "Arav", posts, r, w) }