diff --git a/lib/jekyll/url.rb b/lib/jekyll/url.rb index 8cd47242..f4ea4d33 100644 --- a/lib/jekyll/url.rb +++ b/lib/jekyll/url.rb @@ -89,7 +89,7 @@ module Jekyll # pct-encoded = "%" HEXDIG HEXDIG # sub-delims = "!" / "$" / "&" / "'" / "(" / ")" # / "*" / "+" / "," / ";" / "=" - URI.escape(path, /[^a-zA-Z\d\-._~!$&\'()*+,;=:@\/]/) + URI.escape(path, /[^a-zA-Z\d\-._~!$&\'()*+,;=:@\/]/).encode('utf-8') end # Unescapes a URL path segment @@ -103,7 +103,7 @@ module Jekyll # # Returns the unescaped path. def self.unescape_path(path) - URI.unescape(path) + URI.unescape(path.encode('utf-8')) end end end