@@ -1099,7 +1099,7 @@ def test_should_sanitize_across_newlines
1099
1099
def test_should_prune_mglyph
1100
1100
# https://hackerone.com/reports/2519936
1101
1101
input = "<math><mtext><table><mglyph><style><img src=: onerror=alert(1)>"
1102
- tags = %w( math mtext table mglyph style )
1102
+ tags = %w( math mtext table mglyph style ) . freeze
1103
1103
1104
1104
actual = nil
1105
1105
assert_output ( nil , /WARNING: 'mglyph' tags cannot be allowed by the PermitScrubber/ ) do
@@ -1119,7 +1119,7 @@ def test_should_prune_mglyph
1119
1119
def test_should_prune_malignmark
1120
1120
# https://hackerone.com/reports/2519936
1121
1121
input = "<math><mtext><table><malignmark><style><img src=: onerror=alert(1)>"
1122
- tags = %w( math mtext table malignmark style )
1122
+ tags = %w( math mtext table malignmark style ) . freeze
1123
1123
1124
1124
actual = nil
1125
1125
assert_output ( nil , /WARNING: 'malignmark' tags cannot be allowed by the PermitScrubber/ ) do
@@ -1138,7 +1138,9 @@ def test_should_prune_malignmark
1138
1138
1139
1139
def test_should_prune_noscript
1140
1140
# https://hackerone.com/reports/2509647
1141
- input , tags = "<div><noscript><p id='</noscript><script>alert(1)</script>'></noscript>" , [ "p" , "div" , "noscript" ]
1141
+ input = "<div><noscript><p id='</noscript><script>alert(1)</script>'></noscript>"
1142
+ tags = [ "p" , "div" , "noscript" ] . freeze
1143
+
1142
1144
actual = nil
1143
1145
assert_output ( nil , /WARNING: 'noscript' tags cannot be allowed by the PermitScrubber/ ) do
1144
1146
actual = safe_list_sanitize ( input , tags : tags , attributes : %w( id ) )
0 commit comments