A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
update markdown
aichy126a5a57a343b46
diff --git a/pkg/converter/markdown.go b/pkg/converter/markdown.goindex 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, noden := node.(*ast.Link)if entering && r.renderLinkIsUrl(string(n.Destination)) {_, _ = w.WriteString("<a href=\"")+ // _, _ = w.WriteString("<a test=\"1\" rel=\"nofollow\" href=\"")if r.Unsafe || !html.IsDangerousURL(n.Destination) {_, _ = w.Write(util.EscapeHTML(util.URLEscape(n.Destination, true)))}