diff options
author | John F. Douthat <johndouthat@gmail.com> | 2013-01-28 16:26:12 -0600 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2014-07-02 15:54:47 -0700 |
commit | 41de23ec030f79f00aff3bf00640e855de42a9b8 (patch) | |
tree | f5e005f18bf49e994bfdd7a605d64ebf13c7911f /actionview/test/template | |
parent | 9eb15ed6a08f76ef683bb10a84f824b9dc379e3a (diff) | |
download | rails-41de23ec030f79f00aff3bf00640e855de42a9b8.tar.gz rails-41de23ec030f79f00aff3bf00640e855de42a9b8.tar.bz2 rails-41de23ec030f79f00aff3bf00640e855de42a9b8.zip |
Fix escape_once double-escaping hex-encoded entities
(This is a manual merge of #9102)
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/erb_util_test.rb | 1 | ||||
-rw-r--r-- | actionview/test/template/tag_helper_test.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/actionview/test/template/erb_util_test.rb b/actionview/test/template/erb_util_test.rb index 9bacbba908..3bb84cbc50 100644 --- a/actionview/test/template/erb_util_test.rb +++ b/actionview/test/template/erb_util_test.rb @@ -92,6 +92,7 @@ class ErbUtilTest < ActiveSupport::TestCase def test_html_escape_once assert_equal '1 <>&"' 2 & 3', html_escape_once('1 <>&"\' 2 & 3') + assert_equal " ' ' λ λ " ' < > ", html_escape_once(" ' ' λ λ \" ' < > ") end def test_html_escape_once_returns_unsafe_strings_when_passed_unsafe_strings diff --git a/actionview/test/template/tag_helper_test.rb b/actionview/test/template/tag_helper_test.rb index c78b6450f2..0ea669b3d0 100644 --- a/actionview/test/template/tag_helper_test.rb +++ b/actionview/test/template/tag_helper_test.rb @@ -123,6 +123,7 @@ class TagHelperTest < ActionView::TestCase def test_escape_once assert_equal '1 < 2 & 3', escape_once('1 < 2 & 3') + assert_equal " ' ' λ λ " ' < > ", escape_once(" ' ' λ λ \" ' < > ") end def test_tag_honors_html_safe_for_param_values |