File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,11 @@ def test_simple_format
44
44
end
45
45
46
46
def test_simple_format_should_sanitize_input_when_sanitize_option_is_not_false
47
- assert_equal "<p><b> test with unsafe string </b>code! </p>" , simple_format ( "<b> test with unsafe string </b><script>code!</script>" )
47
+ assert_equal "<p><b> test with unsafe string </b></p>" , simple_format ( "<b> test with unsafe string </b><script>code!</script>" )
48
48
end
49
49
50
50
def test_simple_format_should_sanitize_input_when_sanitize_option_is_true
51
- assert_equal '<p><b> test with unsafe string </b>code! </p>' ,
51
+ assert_equal '<p><b> test with unsafe string </b></p>' ,
52
52
simple_format ( '<b> test with unsafe string </b><script>code!</script>' , { } , sanitize : true )
53
53
end
54
54
@@ -193,7 +193,7 @@ def test_highlight
193
193
194
194
def test_highlight_should_sanitize_input
195
195
assert_equal (
196
- "This is a <mark>beautiful</mark> morningcode! " ,
196
+ "This is a <mark>beautiful</mark> morning " ,
197
197
highlight ( "This is a beautiful morning<script>code!</script>" , "beautiful" )
198
198
)
199
199
end
You can’t perform that action at this time.
0 commit comments