Browse Source

Added more supported link protocols for markdown

Added the ssh:// ts3server:// git:// irc:// ircs:// protocols for links in markdown files rendered
pull/2397/head
Dasoren 9 years ago
parent
commit
7a5fde722e
  1. 2
      modules/base/markdown.go

2
modules/base/markdown.go

@ -29,7 +29,7 @@ func isalnum(c byte) bool {
return (c >= '0' && c <= '9') || isletter(c)
}
var validLinks = [][]byte{[]byte("http://"), []byte("https://"), []byte("ftp://"), []byte("mailto://")}
var validLinks = [][]byte{[]byte("http://"), []byte("https://"), []byte("ftp://"), []byte("mailto://"), []byte("ssh://"), []byte("ts3server://"), []byte("git://"), []byte("irc://"), []byte("ircs://")}
func isLink(link []byte) bool {
for _, prefix := range validLinks {

Loading…
Cancel
Save