aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-06 12:07:13 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-06 12:07:13 +0000
commit25b656fefa75954cffff119a14cf7650f4f99a92 (patch)
treef61ce9d31d432a7c25284509b8309c270ebe2775 /actionpack/test/template
parenteb5ca2ea5ff55e2f6a49580afab5e0ddd0b2bf11 (diff)
downloadrails-25b656fefa75954cffff119a14cf7650f4f99a92.tar.gz
rails-25b656fefa75954cffff119a14cf7650f4f99a92.tar.bz2
rails-25b656fefa75954cffff119a14cf7650f4f99a92.zip
Fixed that single quote was not escaped in a UrlHelper#link_to javascript confirm #549 [Scott Barron]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@837 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-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 47241bd09f..a38a259167 100644
--- a/actionpack/test/template/url_helper_test.rb
+++ b/actionpack/test/template/url_helper_test.rb
@@ -27,6 +27,10 @@ class UrlHelperTest < Test::Unit::TestCase
"<a href=\"http://www.world.com\" onclick=\"return confirm('Are you sure?');\">Hello</a>",
link_to("Hello", "http://www.world.com", :confirm => "Are you sure?")
)
+ assert_equal(
+ "<a href=\"http://www.world.com\" onclick=\"return confirm('You can\\'t possibly be sure, can you?');\">Hello</a>",
+ link_to("Hello", "http://www.world.com", :confirm => "You can't possibly be sure, can you?")
+ )
end
def test_link_image_to