Skip to content

Commit

Permalink
test: fix encoding in the unicode XSS test
Browse files Browse the repository at this point in the history
See flavorjones/loofah#205 for a short history
of this test string.

Related to #111
  • Loading branch information
flavorjones committed Apr 8, 2021
1 parent becbad0 commit c190b32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/sanitizer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def test_should_sanitize_img_dynsrc_lowsrc
end

def test_should_sanitize_div_background_image_unicode_encoded
raw = %(background-image:\0075\0072\006C\0028'\006a\0061\0076\0061\0073\0063\0072\0069\0070\0074\003a\0061\006c\0065\0072\0074\0028.1027\0058.1053\0053\0027\0029'\0029)
raw = %(background-image:\u0075\u0072\u006C\u0028'\u006a\u0061\u0076\u0061\u0073\u0063\u0072\u0069\u0070\u0074\u003a\u0061\u006c\u0065\u0072\u0074\u0028.1027\u0058.1053\u0053\u0027\u0029'\u0029)
assert_equal '', sanitize_css(raw)
end

Expand Down

0 comments on commit c190b32

Please sign in to comment.