Make an effort to handle spaces in filenames in a way that url_for can handle.

This commit is contained in:
Ben Hollis 2013-08-15 21:12:29 -07:00
parent dcd760d4f8
commit 268538f926
4 changed files with 4 additions and 3 deletions

View file

@ -153,6 +153,7 @@ module Middleman
def self.url_for(app, path_or_resource, options={})
# Handle Resources and other things which define their own url method
url = path_or_resource.respond_to?(:url) ? path_or_resource.url : path_or_resource
url = url.gsub(' ', '%20')
begin
uri = URI(url)