Browse Source

markdown: fix mailto: doesn't recognize as valid link (#3790)

pull/3809/merge
Unknwon 8 years ago
parent
commit
7ac09681a2
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      modules/markdown/markdown.go

2
modules/markdown/markdown.go

@ -43,7 +43,7 @@ func BuildSanitizer() {
Sanitizer.AllowURLSchemes(setting.Markdown.CustomURLSchemes...)
}
var validLinksPattern = regexp.MustCompile(`^[a-z][\w-]+://`)
var validLinksPattern = regexp.MustCompile(`^[a-z][\w-]+://|^mailto:`)
// isLink reports whether link fits valid format.
func isLink(link []byte) bool {

Loading…
Cancel
Save