diff options
author | Joe Mooring <joe.mooring@veriphor.com> | 2023-06-10 09:26:35 -0700 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-06-12 15:01:30 +0200 |
commit | e1d43021cab6ff538de5855f1b35d72e9c4e867f (patch) | |
tree | 0d77dd1727be2bc29c2e702efe81487c73476f98 /helpers/url_test.go | |
parent | 5db215d4d6e4a0e353ea9aa21441d9ca4d7caf12 (diff) | |
download | hugo-e1d43021cab6ff538de5855f1b35d72e9c4e867f.tar.gz hugo-e1d43021cab6ff538de5855f1b35d72e9c4e867f.zip |
helpers: Improve schema detection when creating relative URLs
Fixes #11080
Diffstat (limited to 'helpers/url_test.go')
-rw-r--r-- | helpers/url_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helpers/url_test.go b/helpers/url_test.go index bb7f6eed7..6d496ce8e 100644 --- a/helpers/url_test.go +++ b/helpers/url_test.go @@ -177,6 +177,10 @@ func doTestRelURL(t testing.TB, defaultInSubDir, addLanguage, multilingual bool, {"/foo/bar", "https://example.org/foo/", false, "MULTI/foo/bar"}, {"foo/bar", "https://example.org/foo/", false, "/fooMULTI/foo/bar"}, + // Issue 11080 + {"mailto:a@b.com", "http://base/", false, "mailto:a@b.com"}, + {"ftp://b.com/a.txt", "http://base/", false, "ftp://b.com/a.txt"}, + {"/test/foo", "http://base/", false, "MULTI/test/foo"}, {"/" + lang + "/test/foo", "http://base/", false, "/" + lang + "/test/foo"}, {lang + "/test/foo", "http://base/", false, "/" + lang + "/test/foo"}, |