aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-11-16 19:57:09 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2010-11-18 23:31:00 -0200
commit52b71c01fd3c8a87152f55129a8cb3234190734a (patch)
treecb5bae029d05960767990919ffc95cda003f3b68 /actionpack
parent07a74f196d6766c09e28ed696debb120a035dde7 (diff)
downloadrails-52b71c01fd3c8a87152f55129a8cb3234190734a.tar.gz
rails-52b71c01fd3c8a87152f55129a8cb3234190734a.tar.bz2
rails-52b71c01fd3c8a87152f55129a8cb3234190734a.zip
Revert "Quick fix for not escaping []s (not ideal)"
According to http://www.ietf.org/rfc/rfc2616.txt and http://tools.ietf.org/rfc/rfc3986.txt [ and ] are reserved characters and should be escaped using "%" HEX HEX This reverts commit 856d2fd874d72dd9f83204affff4edfef3308361 and 1ee9b40b18a0bed5bb10a0785f7e2730bac983f6..
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/routing_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index ce5c899a19..cd067b7d18 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -1444,7 +1444,7 @@ class RouteSetTest < ActiveSupport::TestCase
end
def test_expand_array_build_query_string
- assert_uri_equal '/foo?x[]=1&x[]=2', default_route_set.generate({:controller => 'foo', :x => [1, 2]})
+ assert_uri_equal '/foo?x%5B%5D=1&x%5B%5D=2', default_route_set.generate({:controller => 'foo', :x => [1, 2]})
end
def test_escape_spaces_build_query_string_selected_keys
@@ -1744,9 +1744,9 @@ class RackMountIntegrationTests < ActiveSupport::TestCase
assert_equal '/posts', @routes.generate({:controller => 'posts'}, {:controller => 'posts', :action => 'index'})
assert_equal '/posts/create', @routes.generate({:action => 'create'}, {:controller => 'posts'})
assert_equal '/posts?foo=bar', @routes.generate(:controller => 'posts', :foo => 'bar')
- assert_equal '/posts?foo[]=bar&foo[]=baz', @routes.generate(:controller => 'posts', :foo => ['bar', 'baz'])
+ assert_equal '/posts?foo%5B%5D=bar&foo%5B%5D=baz', @routes.generate(:controller => 'posts', :foo => ['bar', 'baz'])
assert_equal '/posts?page=2', @routes.generate(:controller => 'posts', :page => 2)
- assert_equal '/posts?q[foo][a]=b', @routes.generate(:controller => 'posts', :q => { :foo => { :a => 'b'}})
+ assert_equal '/posts?q%5Bfoo%5D%5Ba%5D=b', @routes.generate(:controller => 'posts', :q => { :foo => { :a => 'b'}})
assert_equal '/news.rss', @routes.generate(:controller => 'news', :action => 'index', :format => 'rss')