diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2016-01-26 17:24:37 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2016-01-26 17:24:37 -0800 |
commit | 9777a97ffaedcec9b95cb1678e4c74b7cac514ea (patch) | |
tree | 95ce3be36d397df75196ed98202636599689de9f /actionview | |
parent | 0361d8449ff1c18da041df4b7dfe648abf0f1887 (diff) | |
parent | f31a386c7ecdfe8a9173655b515470a2fbc9fcdd (diff) | |
download | rails-9777a97ffaedcec9b95cb1678e4c74b7cac514ea.tar.gz rails-9777a97ffaedcec9b95cb1678e4c74b7cac514ea.tar.bz2 rails-9777a97ffaedcec9b95cb1678e4c74b7cac514ea.zip |
Merge pull request #23242 from maclover7/fix-error-sec
Fix undefined error for `ActionController::Parameters`
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/test/template/text_helper_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/test/template/text_helper_test.rb b/actionview/test/template/text_helper_test.rb index fb98ac6330..03c7597505 100644 --- a/actionview/test/template/text_helper_test.rb +++ b/actionview/test/template/text_helper_test.rb @@ -43,11 +43,11 @@ class TextHelperTest < ActionView::TestCase end def test_simple_format_should_sanitize_input_when_sanitize_option_is_not_false - assert_equal "<p><b> test with unsafe string </b></p>", simple_format("<b> test with unsafe string </b><script>code!</script>") + assert_equal "<p><b> test with unsafe string </b>code!</p>", simple_format("<b> test with unsafe string </b><script>code!</script>") end def test_simple_format_should_sanitize_input_when_sanitize_option_is_true - assert_equal '<p><b> test with unsafe string </b></p>', + assert_equal '<p><b> test with unsafe string </b>code!</p>', simple_format('<b> test with unsafe string </b><script>code!</script>', {}, sanitize: true) end @@ -198,7 +198,7 @@ class TextHelperTest < ActionView::TestCase def test_highlight_should_sanitize_input assert_equal( - "This is a <mark>beautiful</mark> morning", + "This is a <mark>beautiful</mark> morningcode!", highlight("This is a beautiful morning<script>code!</script>", "beautiful") ) end |