From a5a57a343b4609688175d3836ab58ca4e7df9dbe Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 7 Apr 2023 18:26:46 +0800 Subject: [PATCH] update markdown --- pkg/converter/markdown.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/converter/markdown.go b/pkg/converter/markdown.go index 0e5c983a..97a469d4 100644 --- a/pkg/converter/markdown.go +++ b/pkg/converter/markdown.go @@ -35,6 +35,8 @@ func Markdown2HTML(source string) string { html := buf.String() filter := bluemonday.UGCPolicy() filter.AllowStyling() + filter.RequireNoFollowOnLinks(false) + filter.RequireParseableURLs(false) html = filter.Sanitize(html) return html } @@ -111,6 +113,7 @@ func (r *DangerousHTMLRenderer) renderLink(w util.BufWriter, source []byte, node n := node.(*ast.Link) if entering && r.renderLinkIsUrl(string(n.Destination)) { _, _ = w.WriteString("