Ensures that categories are Strings before escaping. Fixes #759.

This commit is contained in:
Parker Moore
2013-01-17 21:55:01 -05:00
parent ab539622dd
commit cd05f6be78

View File

@@ -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)