lib/disk_cache.rb in disk_cache-0.0.6 vs lib/disk_cache.rb in disk_cache-0.0.7
- old
+ new
@@ -165,8 +165,9 @@
# url_escape('http://example.com/hello world')
# # => "http://example.com/hello%20world"
#
# Returns a String with the escaped url
def escape(url)
- URI.escape(url)
+ return URI.escape(url) if url.include? ' '
+ url
end
end