lib/jekyll/post.rb in jekyll-2.0.0.alpha.2 vs lib/jekyll/post.rb in jekyll-2.0.0.alpha.3
- old
+ new
@@ -206,14 +206,14 @@
def url_placeholders
{
:year => date.strftime("%Y"),
:month => date.strftime("%m"),
:day => date.strftime("%d"),
- :title => CGI.escape(slug),
+ :title => slug,
:i_day => date.strftime("%d").to_i.to_s,
:i_month => date.strftime("%m").to_i.to_s,
- :categories => (categories || []).map { |c| URI.escape(c.to_s) }.join('/'),
+ :categories => (categories || []).map { |c| c.to_s }.join('/'),
:short_month => date.strftime("%b"),
:y_day => date.strftime("%j"),
:output_ext => output_ext
}
end
@@ -258,10 +258,10 @@
# dest - The String path to the destination dir.
#
# Returns destination file path String.
def destination(dest)
# The url needs to be unescaped in order to preserve the correct filename
- path = Jekyll.sanitized_path(dest, CGI.unescape(url))
+ path = Jekyll.sanitized_path(dest, URL.unescape_path(url))
path = File.join(path, "index.html") if path[/\.html$/].nil?
path
end
# Returns the shorthand String identifier of this Post.