diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/html-scanner/sanitizer_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/template/template_test.rb | 1 |
2 files changed, 2 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="'><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 diff --git a/actionpack/test/template/template_test.rb b/actionpack/test/template/template_test.rb index 56943381d8..b7f785fe3a 100644 --- a/actionpack/test/template/template_test.rb +++ b/actionpack/test/template/template_test.rb @@ -1,3 +1,4 @@ +# encoding: US-ASCII require "abstract_unit" require "logger" |