This project is archived and is in readonly mode.

Changeset [1b3195b63ca44f0a70b61b75fcf4991cb2fbb944] by Phil Darnowsky

October 14th, 2009 @ 09:49 PM

ActionView.url_for doesn't escape by default

ActionView::Helpers::UrlHelper#url_for used to escape the URLs it generated by
default. This was most commonly seen when generating a path with multiple
query parameters, e.g.

url_for(:controller => :foo, :action => :bar, :this => 123, :that => 456)

would return

http://example.com/foo/bar?that=456&this=123

escaping an ampersand that shouldn't be escaped. This is both wrong and
inconsistent with the behavior of ActionController#url_for, and is changed.

Signed-off-by: Michael Koziarski michael@koziarski.com
http://github.com/rails/rails/commit/1b3195b63ca44f0a70b61b75fcf499...

Committed by Phil Darnowsky

  • M actionpack/lib/action_view/helpers/url_helper.rb
  • M actionpack/test/template/url_helper_test.rb

Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>