Support Unicode characters in filenames, both in source filenames and in the names of proxied paths. Fixes #332.

This commit is contained in:
Ben Hollis 2012-04-01 20:52:22 -07:00
parent 23e0586896
commit dddd409336
9 changed files with 46 additions and 13 deletions

View file

@ -29,7 +29,8 @@ module Middleman
# @param [String] path
# @return [String]
def self.normalize_path(path)
path.sub(/^\//, "").gsub("%20", " ")
# The tr call works around a bug in Ruby's Unicode handling
path.sub(/^\//, "").tr('','')
end
# Extract the text of a Rack response as a string.