From 1798cda23a891d4c7e2ff84c060b6a8d68bcee2f Mon Sep 17 00:00:00 2001 From: Daniele Tonon Date: Fri, 26 May 2023 08:50:32 +0200 Subject: [PATCH] Use an indipendent var for note content --- note.html | 2 +- render.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/note.html b/note.html index 82ce1ff..fb12e3a 100644 --- a/note.html +++ b/note.html @@ -81,7 +81,7 @@
- {{.description | SanitizeString | BasicFormatting }} + {{.content | SanitizeString | BasicFormatting }}
diff --git a/render.go b/render.go index fffb512..13dd08d 100644 --- a/render.go +++ b/render.go @@ -160,6 +160,8 @@ func render(w http.ResponseWriter, r *http.Request) { description = prettyJsonOrRaw(event.Content) } + content := prettyJsonOrRaw(event.Content) + eventJSON, _ := json.MarshalIndent(event, "", " ") params := map[string]any{ @@ -175,6 +177,7 @@ func render(w http.ResponseWriter, r *http.Request) { "metadata": metadata, "authorLong": authorLong, "description": description, + "content": content, "textImageURL": textImageURL, "videoType": videoType, "image": image,