diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index ef7c4d3a..56119e07 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -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 diff --git a/test/source/+/foo.md b/test/source/+/foo.md new file mode 100644 index 00000000..555abb65 --- /dev/null +++ b/test/source/+/foo.md @@ -0,0 +1,6 @@ +--- +layout: default +title : Page inside + +--- +Line 1 +{{ page.title }} diff --git a/test/test_page.rb b/test/test_page.rb index 2d8c98ee..5e6ec3da 100644 --- a/test/test_page.rb +++ b/test/test_page.rb @@ -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