diff --git a/History.txt b/History.txt index 9e40c72b..0f831c7d 100644 --- a/History.txt +++ b/History.txt @@ -5,6 +5,7 @@ * Allow setting of RedCloth options (#284) * Bug Fixes * Allow some special characters in highlight names + * URL escape category names in URL generation (#360) == 0.11.2 / 2011-12-27 * Bug Fixes diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index bafb7257..a46d0798 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -131,7 +131,7 @@ module Jekyll "title" => CGI.escape(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) }.join('/'), + "categories" => categories.map { |c| URI.escape(c) }.join('/'), "output_ext" => self.output_ext }.inject(template) { |result, token| result.gsub(/:#{Regexp.escape token.first}/, token.last)