fog/fog — pull request #1421 by jparker (2012-12-24 23:35:35+00:00)
Title: use CGI.escapeHTML instead of CGI.escape

CGI.escape creates URL-safe encodings, but we need XML-safe encodings.
If the key name has a "/" in it (as for a directory structure) it gets
replaced with a URL-safe "%2F" which S3 treats as a literal part of the
key name. We only need to escape the parts of the key that could result
in malformed XML.