From ac3c936820033f27e32c9a4490f2f33d6ffd6b05 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Thu, 2 Jan 2020 11:03:03 -0800 Subject: Make sure whitelisted URI schemes are handled properly by the sanitizer --- url/url_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'url') diff --git a/url/url_test.go b/url/url_test.go index 54868a9..56b6e13 100644 --- a/url/url_test.go +++ b/url/url_test.go @@ -13,6 +13,8 @@ func TestAbsoluteURL(t *testing.T) { []string{"https://example.org/path/file.ext", "https://example.org/folder", "path/file.ext"}, []string{"https://example.org/path/file.ext", "https://example.org/folder/", "https://example.org/path/file.ext"}, []string{"https://static.example.org/path/file.ext", "https://www.example.org/", "//static.example.org/path/file.ext"}, + []string{"magnet:?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a", "https://www.example.org/", "magnet:?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a"}, + []string{"magnet:?xt.1=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C&xt.2=urn:sha1:TXGCZQTH26NL6OUQAJJPFALHG2LTGBC7", "https://www.example.org/", "magnet:?xt.1=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C&xt.2=urn:sha1:TXGCZQTH26NL6OUQAJJPFALHG2LTGBC7"}, } for _, scenario := range scenarios { -- cgit v1.2.3