mirror of
https://github.com/russross/blackfriday.git
synced 2024-03-22 13:40:34 +08:00
Relative URIs are considered safe
This commit is contained in:
parent
d0e587acc8
commit
59358adea8
|
@ -718,7 +718,7 @@ func autoLink(p *parser, out *bytes.Buffer, data []byte, offset int) int {
|
||||||
return linkEnd - rewind
|
return linkEnd - rewind
|
||||||
}
|
}
|
||||||
|
|
||||||
var validUris = [][]byte{[]byte("http://"), []byte("https://"), []byte("ftp://"), []byte("mailto://")}
|
var validUris = [][]byte{[]byte("http://"), []byte("https://"), []byte("ftp://"), []byte("mailto://"), []byte("/")}
|
||||||
|
|
||||||
func isSafeLink(link []byte) bool {
|
func isSafeLink(link []byte) bool {
|
||||||
for _, prefix := range validUris {
|
for _, prefix := range validUris {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user