'), '
')
assert_equal(HtmlSanitizer.strict('
test'), 'test (
/some/path)')
assert_equal(HtmlSanitizer.strict('
test'), 'test (
https://some/path)')
assert_equal(HtmlSanitizer.strict('
test', true), 'test (
https://some/path)')
assert_equal(HtmlSanitizer.strict('
'), '
')
assert_equal(HtmlSanitizer.strict('
'), '')
assert_equal(HtmlSanitizer.strict('
+ADw-SCRIPT+AD4-alert(\'XSS\');+ADw-/SCRIPT+AD4-'), ' +ADw-SCRIPT+AD4-alert(\'XSS\');+ADw-/SCRIPT+AD4-')
assert_equal(HtmlSanitizer.strict(''), '')
assert_equal(HtmlSanitizer.strict('
XSS'), 'XSS (
http://66.000146.0x7.147/)')
assert_equal(HtmlSanitizer.strict('
XSS', true), 'XSS (
http://66.000146.0x7.147/)')
assert_equal(HtmlSanitizer.strict('
XSS'), 'XSS (
//www.google.com/)')
assert_equal(HtmlSanitizer.strict('
XSS', true), 'XSS (
//www.google.com/)')
assert_equal(HtmlSanitizer.strict('
'), 'X')
assert_equal(HtmlSanitizer.strict('
CLICKME'), 'CLICKME')
assert_equal(HtmlSanitizer.strict('
CLICKME'), 'CLICKME')
assert_equal(HtmlSanitizer.strict('
CLICKME', true), 'CLICKME')
assert_equal(HtmlSanitizer.strict('
'), '
')
assert_equal(HtmlSanitizer.strict('
'), '
')
assert_equal(HtmlSanitizer.strict('
'), '')
assert_equal(HtmlSanitizer.strict('
'), '')
assert_equal(HtmlSanitizer.strict(''), '')
assert_equal(HtmlSanitizer.strict(''), '')
assert_equal(HtmlSanitizer.strict(''), '')
assert_equal(HtmlSanitizer.strict('XXX'), 'XXX')
assert_equal(HtmlSanitizer.strict('XXX', true), 'XXX')
assert_equal(HtmlSanitizer.strict(''), 'alert(1)')
assert_equal(HtmlSanitizer.strict(''), 'http://example.com')
assert_equal(HtmlSanitizer.strict('', true), 'http://example.com')
assert_equal(HtmlSanitizer.strict(''), '')
end
end