Signed-off-by: oppiliappan me@oppi.li
+4
-3
appview/pages/funcmap.go
+4
-3
appview/pages/funcmap.go
···
19
19
20
20
"github.com/dustin/go-humanize"
21
21
"github.com/go-enry/go-enry/v2"
22
-
"github.com/microcosm-cc/bluemonday"
23
22
"tangled.sh/tangled.sh/core/appview/filetree"
24
23
"tangled.sh/tangled.sh/core/appview/pages/markup"
25
24
)
···
209
208
},
210
209
211
210
"markdown": func(text string) template.HTML {
212
-
rctx := &markup.RenderContext{RendererType: markup.RendererTypeDefault}
213
-
return template.HTML(bluemonday.UGCPolicy().Sanitize(rctx.RenderMarkdown(text)))
211
+
p.rctx.RendererType = markup.RendererTypeDefault
212
+
htmlString := p.rctx.RenderMarkdown(text)
213
+
sanitized := p.rctx.SanitizeDefault(htmlString)
214
+
return template.HTML(sanitized)
214
215
},
215
216
"isNil": func(t any) bool {
216
217
// returns false for other "zero" values