Skip to content

Commit

Permalink
Ruby 2 compat. CGI.escapeHTML has changed the way it escapes apostrop…
Browse files Browse the repository at this point in the history
…hes a few times, so fix up the test to work with however it chooses to escape.
  • Loading branch information
jeremy committed Oct 7, 2012
1 parent b9999c5 commit 3f97ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/test/template/html-scanner/sanitizer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def test_should_not_fall_for_ridiculous_hack
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
Expand Down

0 comments on commit 3f97ee8

Please sign in to comment.