From 59358adea87fa5061b5c21be571a3480bf0217a9 Mon Sep 17 00:00:00 2001 From: Darren Coxall Date: Mon, 9 Dec 2013 14:41:37 +0000 Subject: [PATCH] Relative URIs are considered safe --- inline.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inline.go b/inline.go index 0e7cb86..0348dbf 100644 --- a/inline.go +++ b/inline.go @@ -718,7 +718,7 @@ func autoLink(p *parser, out *bytes.Buffer, data []byte, offset int) int { 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 { for _, prefix := range validUris {