aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/url_helper_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-06-05 04:29:19 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-06-05 04:29:19 +0000
commit7709df5f17cc6ef33059aa3b4c9249c10d7d124c (patch)
tree5a2e64c1f897129a6c51ade3e2865a9e3c09d385 /actionpack/test/template/url_helper_test.rb
parentf80468c3c319f56a24113381287445857f2ae807 (diff)
downloadrails-7709df5f17cc6ef33059aa3b4c9249c10d7d124c.tar.gz
rails-7709df5f17cc6ef33059aa3b4c9249c10d7d124c.tar.bz2
rails-7709df5f17cc6ef33059aa3b4c9249c10d7d124c.zip
Don't double-escape url_for in views. Closes #8144.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6942 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/url_helper_test.rb')
-rw-r--r--actionpack/test/template/url_helper_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb
index 1762015d9d..43ec8ca0d3 100644
--- a/actionpack/test/template/url_helper_test.rb
+++ b/actionpack/test/template/url_helper_test.rb
@@ -25,6 +25,11 @@ class UrlHelperTest < Test::Unit::TestCase
assert_equal "http://www.example.com?a=b&c=d", url_for(:a => 'b', :c => 'd', :escape => false)
end
+ def test_url_for_escapes_url_once
+ @controller.url = "http://www.example.com?a=b&amp;c=d"
+ assert_equal "http://www.example.com?a=b&amp;c=d", url_for("http://www.example.com?a=b&amp;c=d")
+ end
+
# todo: missing test cases
def test_button_to_with_straight_url
assert_dom_equal "<form method=\"post\" action=\"http://www.example.com\" class=\"button-to\"><div><input type=\"submit\" value=\"Hello\" /></div></form>", button_to("Hello", "http://www.example.com")