parent
0f0ac6f586
commit
ec5b45cd7c
|
@ -152,7 +152,7 @@ module Jekyll
|
|||
#
|
||||
# Returns the escaped String.
|
||||
def uri_escape(input)
|
||||
Addressable::URI.encode(input)
|
||||
Addressable::URI.normalize_component(input)
|
||||
end
|
||||
|
||||
# Replace any whitespace in the input string with a single space
|
||||
|
|
|
@ -317,6 +317,11 @@ class TestFilters < JekyllUnitTest
|
|||
assert_equal "my%20things", @filter.uri_escape("my things")
|
||||
end
|
||||
|
||||
should "escape colon" do
|
||||
assert_equal "foo:bar", @filter.uri_escape("foo:bar")
|
||||
assert_equal "foo%20bar:baz", @filter.uri_escape("foo bar:baz")
|
||||
end
|
||||
|
||||
context "absolute_url filter" do
|
||||
should "produce an absolute URL from a page URL" do
|
||||
page_url = "/about/my_favorite_page/"
|
||||
|
|
Loading…
Reference in New Issue