Skip to content

Commit

Permalink
Removed Prototype specific Safari 2 AJAX hack.
Browse files Browse the repository at this point in the history
The normal null character stripper is still there.
  • Loading branch information
josh committed Feb 1, 2009
1 parent fa7aa19 commit 28b65c9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion actionpack/lib/action_controller/rack_ext/parse_query.rb
Expand Up @@ -10,7 +10,6 @@ module Utils
def parse_query(qs, d = '&;') def parse_query(qs, d = '&;')
qs = qs.dup qs = qs.dup
qs.chop! if qs[-1] == 0 qs.chop! if qs[-1] == 0
qs.gsub!(/&_=$/, '')
parse_query_without_ajax_body_cleanup(qs, d) parse_query_without_ajax_body_cleanup(qs, d)
end end
module_function :parse_query module_function :parse_query
Expand Down
Expand Up @@ -156,12 +156,6 @@ def teardown
assert_parses expected, query assert_parses expected, query
end end


test "parses params with Prototype's hack around Safari 2 trailing null character" do
query = "selected[]=1&selected[]=2&selected[]=3&_="
expected = { "selected" => [ "1", "2", "3" ] }
assert_parses expected, query
end

test "passes through rack middleware and parses params" do test "passes through rack middleware and parses params" do
with_muck_middleware do with_muck_middleware do
assert_parses({ "a" => { "b" => "c" } }, "a[b]=c") assert_parses({ "a" => { "b" => "c" } }, "a[b]=c")
Expand Down

0 comments on commit 28b65c9

Please sign in to comment.