|
|
@@ -22,13 +22,21 @@ func TestIsRelativePath(t *testing.T) {
|
|
|
"path?query=value": true,
|
|
|
"path#fragment": true,
|
|
|
"path?query#fragment": true,
|
|
|
+ "/bookmarklet?uri=https://example.org/rss": true,
|
|
|
|
|
|
// Not relative paths
|
|
|
"https://example.org/file.ext": false,
|
|
|
"http://example.org/file.ext": false,
|
|
|
"//example.org/file.ext": false,
|
|
|
"//example.org": false,
|
|
|
+ " //example.org": false,
|
|
|
+ " //example.org/path": false,
|
|
|
+ "\t//example.org": false,
|
|
|
+ "\n//example.org": false,
|
|
|
+ " /path": false,
|
|
|
+ "/path ": false,
|
|
|
`/\example.org`: false,
|
|
|
+ ` /\example.org`: false,
|
|
|
`\example.org`: false,
|
|
|
`path\to\file.ext`: false,
|
|
|
"ftp://example.org/file.ext": false,
|