aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2012-10-06 21:06:10 -0700
committerPrem Sichanugrist <s@sikac.hu>2013-02-24 16:32:25 -0500
commit42d7927c22a2c219d6145d9375be65a04a83dce3 (patch)
tree032d519020725709c9d8de27985d543af167851e /actionpack
parent2a5f6d8fe6898f2570ba66382336d56894a43322 (diff)
downloadrails-42d7927c22a2c219d6145d9375be65a04a83dce3.tar.gz
rails-42d7927c22a2c219d6145d9375be65a04a83dce3.tar.bz2
rails-42d7927c22a2c219d6145d9375be65a04a83dce3.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.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 62ad6be680..844484ee47 100644
--- a/actionpack/test/template/html-scanner/sanitizer_test.rb
+++ b/actionpack/test/template/html-scanner/sanitizer_test.rb
@@ -210,7 +210,7 @@ class SanitizerTest < ActionController::TestCase
# TODO: Clean up
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