diff options
author | Jamis Buck <jamis@37signals.com> | 2005-08-14 08:43:07 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-08-14 08:43:07 +0000 |
commit | 8910de6a54324b38b6a20ab93c870e3146fd3a37 (patch) | |
tree | 10284c7ff7a372e68bc23b2a559992009182ef34 /actionpack/test/template | |
parent | 85c603fc9ea94aae98255bb5bd8e20212441ff2e (diff) | |
download | rails-8910de6a54324b38b6a20ab93c870e3146fd3a37.tar.gz rails-8910de6a54324b38b6a20ab93c870e3146fd3a37.tar.bz2 rails-8910de6a54324b38b6a20ab93c870e3146fd3a37.zip |
Make link_to escape the javascript in the confirm option #1964 [nicolas.pouillard@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/url_helper_test.rb | 4 |
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 0b75528176..8367108fab 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -56,6 +56,10 @@ class UrlHelperTest < Test::Unit::TestCase "<a href=\"http://www.example.com\" onclick=\"return confirm('You can\\'t possibly be sure, can you?');\">Hello</a>", link_to("Hello", "http://www.example.com", :confirm => "You can't possibly be sure, can you?") ) + assert_equal( + "<a href=\"http://www.example.com\" onclick=\"return confirm('You can\\'t possibly be sure,\\n can you?');\">Hello</a>", + link_to("Hello", "http://www.example.com", :confirm => "You can't possibly be sure,\n can you?") + ) end def test_link_to_unless |