From 1aa2a8f6554fe60867c00cfc846e54da1b44a82f Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Mon, 15 Nov 2021 22:01:08 +0100 Subject: [PATCH] Code highlighting in editor preview as well --- editor.go | 3 --- templates/editor.gohtml | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/editor.go b/editor.go index 5d1552a..4eb0049 100644 --- a/editor.go +++ b/editor.go @@ -12,7 +12,6 @@ import ( "strings" "github.com/gorilla/websocket" - "github.com/microcosm-cc/bluemonday" "go.goblog.app/app/pkgs/contenttype" "gopkg.in/yaml.v3" ) @@ -86,8 +85,6 @@ func (a *goBlog) createMarkdownPreview(blog string, markdown []byte) (rendered [ if err != nil { return nil, err } - // Sanitize HTML - rendered = bluemonday.UGCPolicy().SanitizeBytes(rendered) return } diff --git a/templates/editor.gohtml b/templates/editor.gohtml index 4bbd88a..9124786 100644 --- a/templates/editor.gohtml +++ b/templates/editor.gohtml @@ -1,4 +1,5 @@ {{ define "title" }} + {{ string .Blog.Lang "editor" }} - {{ mdtitle .Blog.Title }} {{ end }}