#53 ✓resolved
raggi

[PATCH] Rack::Utils.escape_path; Rack;:Utils.escape does not correctly escape for path strings

Reported by raggi | June 17th, 2009 @ 08:50 PM | in 1.x

Rack::Utils.escape is designed to escape strings that will be used in query parameters. In the path portion of an url, a space should be encoded as %20.

This patch adds support in Rack::Utils.escape for a second boolean argument to escape spaces correctly for paths, and adds a simple helper method Rack;:Utils.escape_path.

It may be desirable to alter this code to use two distinct constants, instead of constructing two extra objects (one string and one regex) during each call.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages