mirror of https://github.com/gogs/gogs.git
markdown: fix mailto: doesn't recognize as valid link (#3790)
parent
1863f38286
commit
7ac09681a2
|
@ -43,7 +43,7 @@ func BuildSanitizer() {
|
||||||
Sanitizer.AllowURLSchemes(setting.Markdown.CustomURLSchemes...)
|
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.
|
// isLink reports whether link fits valid format.
|
||||||
func isLink(link []byte) bool {
|
func isLink(link []byte) bool {
|
||||||
|
|
Loading…
Reference in New Issue