diff options
author | Bruno Michel <bmichel@menfin.info> | 2010-06-26 19:00:57 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-28 11:40:27 +0200 |
commit | 2002e5877efa40b336b70b707670e734c6389958 (patch) | |
tree | 88fda5bcd8dde17b6e1fbe76768b73a01539aec4 /actionpack/test/template/html-scanner/sanitizer_test.rb | |
parent | dd8b7417a9b793b7780bf5ca5e04b1c05ac3a8f9 (diff) | |
download | rails-2002e5877efa40b336b70b707670e734c6389958.tar.gz rails-2002e5877efa40b336b70b707670e734c6389958.tar.bz2 rails-2002e5877efa40b336b70b707670e734c6389958.zip |
Strip_tags never ending attribute should not raise a TypeError [#4870 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test/template/html-scanner/sanitizer_test.rb')
-rw-r--r-- | actionpack/test/template/html-scanner/sanitizer_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/html-scanner/sanitizer_test.rb b/actionpack/test/template/html-scanner/sanitizer_test.rb index a6e760b0b6..c9edde8892 100644 --- a/actionpack/test/template/html-scanner/sanitizer_test.rb +++ b/actionpack/test/template/html-scanner/sanitizer_test.rb @@ -257,6 +257,10 @@ class SanitizerTest < ActionController::TestCase assert_sanitized %{<a href=\"http://www.domain.com?var1=1&var2=2\">my link</a>} end + def test_should_sanitize_neverending_attribute + assert_sanitized "<span class=\"\\", "<span class=\"\\\">" + end + protected def assert_sanitized(input, expected = nil) @sanitizer ||= HTML::WhiteListSanitizer.new |