From cd05f6be783fba8460ae1e7fb754080a74c0dfe3 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Thu, 17 Jan 2013 21:55:01 -0500 Subject: [PATCH] Ensures that categories are Strings before escaping. Fixes #759. --- lib/jekyll/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 835f9a42..b08021d0 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -154,7 +154,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.to_s) }.join('/'), "output_ext" => self.output_ext }.inject(template) { |result, token| result.gsub(/:#{Regexp.escape token.first}/, token.last)