removed cgi unescape in page destination
This commit is contained in:
parent
7ee89982e8
commit
5c47014c90
|
@ -134,9 +134,7 @@ module Jekyll
|
|||
#
|
||||
# Returns the destination file path String.
|
||||
def destination(dest)
|
||||
# The url needs to be unescaped in order to preserve the correct
|
||||
# filename.
|
||||
path = File.join(dest, CGI.unescape(self.url))
|
||||
path = File.join(dest, self.url)
|
||||
path = File.join(path, "index.html") if self.url =~ /\/$/
|
||||
path
|
||||
end
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: default
|
||||
title : Page inside +
|
||||
---
|
||||
Line 1
|
||||
{{ page.title }}
|
|
@ -127,6 +127,15 @@ class TestPage < Test::Unit::TestCase
|
|||
assert File.exists?(File.join(dest_dir, 'contacts.html'))
|
||||
end
|
||||
|
||||
should "write even when the folder name is plus" do
|
||||
page = setup_page('+', 'foo.md')
|
||||
do_render(page)
|
||||
page.write(dest_dir)
|
||||
|
||||
assert File.directory?(dest_dir)
|
||||
assert File.exists?(File.join(dest_dir, '+', 'foo.html'))
|
||||
end
|
||||
|
||||
should "write properly without html extension" do
|
||||
page = setup_page('contacts.html')
|
||||
page.site.permalink_style = :pretty
|
||||
|
|
Loading…
Reference in New Issue