From 7ac09681a2bd707aa8ca7e2c0d458afa72359a0a Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 10 Feb 2017 17:03:27 -0500 Subject: [PATCH] markdown: fix mailto: doesn't recognize as valid link (#3790) --- modules/markdown/markdown.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {