Use Addressable instead of URI to decode
This commit is contained in:
parent
7cded91a7c
commit
6fb05e0799
|
@ -1,4 +1,4 @@
|
||||||
require "uri"
|
require "addressable/uri"
|
||||||
require "json"
|
require "json"
|
||||||
require "date"
|
require "date"
|
||||||
require "liquid"
|
require "liquid"
|
||||||
|
@ -152,7 +152,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns the escaped String.
|
# Returns the escaped String.
|
||||||
def uri_escape(input)
|
def uri_escape(input)
|
||||||
URI.escape(input)
|
Addressable::URI.encode(input)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Replace any whitespace in the input string with a single space
|
# Replace any whitespace in the input string with a single space
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
require "addressable/uri"
|
||||||
require "uri"
|
require "uri"
|
||||||
|
|
||||||
# Public: Methods that generate a URL for a resource such as a Post or a Page.
|
# Public: Methods that generate a URL for a resource such as a Post or a Page.
|
||||||
|
@ -159,7 +160,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns the unescaped path.
|
# Returns the unescaped path.
|
||||||
def self.unescape_path(path)
|
def self.unescape_path(path)
|
||||||
URI.unescape(path.encode("utf-8"))
|
Addressable::URI.unencode(path.encode("utf-8"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue