diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-10-06 21:06:10 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-10-06 21:06:10 -0700 |
commit | 3f97ee8014bbadede64f7ea3147b1833fc34e536 (patch) | |
tree | 66be73218e1267f7615225f64df3bd7169b08587 /actionpack | |
parent | b9999c58c21544afb1300ce1b6c7ac30b0249c9a (diff) | |
download | rails-3f97ee8014bbadede64f7ea3147b1833fc34e536.tar.gz rails-3f97ee8014bbadede64f7ea3147b1833fc34e536.tar.bz2 rails-3f97ee8014bbadede64f7ea3147b1833fc34e536.zip |
Ruby 2 compat. CGI.escapeHTML has changed the way it escapes apostrophes a few times, so fix up the test to work with however it chooses to escape.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/template/html-scanner/sanitizer_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/test/template/html-scanner/sanitizer_test.rb b/actionpack/test/template/html-scanner/sanitizer_test.rb index 324caef224..d9b57776c9 100644 --- a/actionpack/test/template/html-scanner/sanitizer_test.rb +++ b/actionpack/test/template/html-scanner/sanitizer_test.rb @@ -233,7 +233,7 @@ class SanitizerTest < ActionController::TestCase end def test_should_sanitize_attributes - assert_sanitized %(<SPAN title="'><script>alert()</script>">blah</SPAN>), %(<span title="'><script>alert()</script>">blah</span>) + assert_sanitized %(<SPAN title="'><script>alert()</script>">blah</SPAN>), %(<span title="#{CGI.escapeHTML "'><script>alert()</script>"}">blah</span>) end def test_should_sanitize_illegal_style_properties |