aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/url_helper_test.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-10-18 16:42:19 +0000
committerRick Olson <technoweenie@gmail.com>2006-10-18 16:42:19 +0000
commitdbd0bd5e5c9946ffb48bf8651f81ebc6dd9b52e5 (patch)
tree0b285eb84a3a651e3b1ba59b64010644bc7fcc45 /actionpack/test/template/url_helper_test.rb
parent02358c83b76f9fc56b6cabaee24b244d17d08cff (diff)
downloadrails-dbd0bd5e5c9946ffb48bf8651f81ebc6dd9b52e5.tar.gz
rails-dbd0bd5e5c9946ffb48bf8651f81ebc6dd9b52e5.tar.bz2
rails-dbd0bd5e5c9946ffb48bf8651f81ebc6dd9b52e5.zip
Add <%= escape_once html %> to escape html while leaving any currently escaped entities alone. Fix button_to double-escaping issue. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5322 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/url_helper_test.rb')
-rw-r--r--actionpack/test/template/url_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb
index 77ca8094f7..ba813f72ce 100644
--- a/actionpack/test/template/url_helper_test.rb
+++ b/actionpack/test/template/url_helper_test.rb
@@ -38,6 +38,10 @@ class UrlHelperTest < Test::Unit::TestCase
assert_dom_equal "<form method=\"post\" action=\"http://www.example.com/q1=v1&amp;q2=v2\" class=\"button-to\"><div><input type=\"submit\" value=\"Hello\" /></div></form>", button_to("Hello", "http://www.example.com/q1=v1&q2=v2")
end
+ def test_button_to_with_escaped_query
+ assert_dom_equal "<form method=\"post\" action=\"http://www.example.com/q1=v1&amp;q2=v2\" class=\"button-to\"><div><input type=\"submit\" value=\"Hello\" /></div></form>", button_to("Hello", "http://www.example.com/q1=v1&amp;q2=v2")
+ end
+
def test_button_to_with_query_and_no_name
assert_dom_equal "<form method=\"post\" action=\"http://www.example.com?q1=v1&amp;q2=v2\" class=\"button-to\"><div><input type=\"submit\" value=\"http://www.example.com?q1=v1&amp;q2=v2\" /></div></form>", button_to(nil, "http://www.example.com?q1=v1&q2=v2")
end