aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/html-scanner
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/html-scanner')
-rw-r--r--actionpack/test/controller/html-scanner/sanitizer_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/test/controller/html-scanner/sanitizer_test.rb b/actionpack/test/controller/html-scanner/sanitizer_test.rb
index 8fe9bbc5e8..a9f4e88742 100644
--- a/actionpack/test/controller/html-scanner/sanitizer_test.rb
+++ b/actionpack/test/controller/html-scanner/sanitizer_test.rb
@@ -203,6 +203,12 @@ class SanitizerTest < Test::Unit::TestCase
assert_equal expected, sanitize_css(raw)
end
+ def test_should_sanitize_with_trailing_space
+ raw = "display:block; "
+ expected = "display: block;"
+ assert_equal expected, sanitize_css(raw)
+ end
+
def test_should_sanitize_xul_style_attributes
raw = %(-moz-binding:url('http://ha.ckers.org/xssmoz.xml#xss'))
assert_equal '', sanitize_css(raw)
@@ -247,4 +253,4 @@ protected
def sanitize_css(input)
(@sanitizer ||= HTML::WhiteListSanitizer.new).sanitize_css(input)
end
-end \ No newline at end of file
+end