Rails 2.3.5
Upgrade to Rails 2.3.5. Also work around this bug: https://rails.lighthouseapp.com/projects/8994/tickets/3524 created by the aforementioned Rails release.
This commit is contained in:
parent
a6429f8c22
commit
e3832c6f79
187 changed files with 2316 additions and 891 deletions
|
@ -39,7 +39,16 @@ class SanitizeHelperTest < ActionView::TestCase
|
|||
%{This is a test.\n\n\nIt no longer contains any HTML.\n}, strip_tags(
|
||||
%{<title>This is <b>a <a href="" target="_blank">test</a></b>.</title>\n\n<!-- it has a comment -->\n\n<p>It no <b>longer <strong>contains <em>any <strike>HTML</strike></em>.</strong></b></p>\n}))
|
||||
assert_equal "This has a here.", strip_tags("This has a <!-- comment --> here.")
|
||||
[nil, '', ' '].each { |blank| assert_equal blank, strip_tags(blank) }
|
||||
[nil, '', ' '].each do |blank|
|
||||
stripped = strip_tags(blank)
|
||||
assert_equal blank, stripped
|
||||
assert stripped.html_safe? unless blank.nil?
|
||||
end
|
||||
assert strip_tags("<script>").html_safe?
|
||||
end
|
||||
|
||||
def test_sanitize_is_marked_safe
|
||||
assert sanitize("<html><script></script></html>").html_safe?
|
||||
end
|
||||
|
||||
def assert_sanitized(text, expected = nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue