From 2e8a7063273015683ccfb7d76ca525382aabd840 Mon Sep 17 00:00:00 2001
From: Fabian Schwahn
Date: Fri, 5 May 2017 09:47:50 +0200
Subject: [PATCH] Make tests pass again with recent nokogiri versions
---
test/sanitizer_test.rb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/sanitizer_test.rb b/test/sanitizer_test.rb
index a909a1f..1995744 100644
--- a/test/sanitizer_test.rb
+++ b/test/sanitizer_test.rb
@@ -58,11 +58,11 @@ def test_strip_tags_with_quote
end
def test_strip_invalid_html
- assert_equal "", full_sanitize("<<This is a test.
")
end
- def test_strip_tags_with_many_open_quotes
- assert_equal "", full_sanitize("<<")
+ def test_escape_tags_with_many_open_quotes
+ assert_equal "<<", full_sanitize("<<")
end
def test_strip_tags_with_sentence
@@ -123,7 +123,7 @@ def test_full_sanitize_respect_html_escaping_of_the_given_string
end
def test_strip_links_with_tags_in_tags
- expected = "a href='hello'>all day long/a>"
+ expected = "<a href='hello'>all day long</a>"
input = "<a href='hello'>all day long</a>"
assert_equal expected, link_sanitize(input)
end
@@ -360,7 +360,7 @@ def test_should_sanitize_invalid_script_tag
end
def test_should_sanitize_script_tag_with_multiple_open_brackets
- assert_sanitized %(<), "alert(\"XSS\");//"
+ assert_sanitized %(<), "<alert(\"XSS\");//<"
assert_sanitized %(