aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/html-scanner
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2012-10-06 21:06:10 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2012-10-06 21:06:10 -0700
commit3f97ee8014bbadede64f7ea3147b1833fc34e536 (patch)
tree66be73218e1267f7615225f64df3bd7169b08587 /actionpack/test/template/html-scanner
parentb9999c58c21544afb1300ce1b6c7ac30b0249c9a (diff)
downloadrails-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/test/template/html-scanner')
-rw-r--r--actionpack/test/template/html-scanner/sanitizer_test.rb2
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="'&gt;&lt;script&gt;alert()&lt;/script&gt;">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