diff --git a/modules/markdown/markdown.go b/modules/markdown/markdown.go index 7458186f0..9e42d072d 100644 --- a/modules/markdown/markdown.go +++ b/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 {