check if relative URL contains a colon

fixes #2834
This commit is contained in:
Florian Thomas
2016-07-08 20:33:47 +02:00
parent f6dc749332
commit cc82d44222
3 changed files with 22 additions and 4 deletions

View File

@@ -70,5 +70,15 @@ class TestURL < JekyllUnitTest
:placeholders => matching_doc.url_placeholders
).to_s
end
should "throw an exception if the URL contains a colon" do
url = URL.new(
:template => "/:x/:y/:z",
:placeholders => { :x => "foo", :z => "bar" }
)
assert_raises Jekyll::Errors::InvalidURLError do
url.to_s
end
end
end
end