Lines 19-24
class SanitizerTest < Test::Unit::TestCase
Link Here
|
19 |
assert_equal "This has a here.", sanitizer.sanitize("This has a <!-- comment --> here.") |
19 |
assert_equal "This has a here.", sanitizer.sanitize("This has a <!-- comment --> here.") |
20 |
assert_equal "This has a here.", sanitizer.sanitize("This has a <![CDATA[<section>]]> here.") |
20 |
assert_equal "This has a here.", sanitizer.sanitize("This has a <![CDATA[<section>]]> here.") |
21 |
assert_equal "This has an unclosed ", sanitizer.sanitize("This has an unclosed <![CDATA[<section>]] here...") |
21 |
assert_equal "This has an unclosed ", sanitizer.sanitize("This has an unclosed <![CDATA[<section>]] here...") |
|
|
22 |
assert_equal "non printable char is a tag", sanitizer.sanitize("<\x07a href='/hello'>non printable char is a tag</a>") |
22 |
[nil, '', ' '].each { |blank| assert_equal blank, sanitizer.sanitize(blank) } |
23 |
[nil, '', ' '].each { |blank| assert_equal blank, sanitizer.sanitize(blank) } |
23 |
end |
24 |
end |
24 |
|
25 |
|
25 |
- |
|
|