Escape entries in directory listings

This commit is contained in:
2012-10-22 14:32:46 +02:00
parent 3821d4a055
commit bf00b2a352
2 changed files with 4 additions and 3 deletions

View File

@@ -130,7 +130,8 @@ module RemoteStorage
directory_entries(user, directory).each do |entry|
timestamp = DateTime.rfc2822(entry["last_modified"]).to_i
listing.merge!({ CGI.unescape(entry["name"]) => timestamp })
entry_name = CGI.unescape(entry["name"])
listing.merge!({ CGI.escape(entry_name) => timestamp })
end
listing