Skip to content

Commit 8cd5eea

Browse files
committed
Add a test for SanitizationFilter::ANCHOR_SCHEMES
Clients may come to rely on this, so we should have a test to ensure we don't break them.
1 parent e3ed4f7 commit 8cd5eea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/html/pipeline/sanitization_filter_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ def test_whitelist_from_full_constant
8888
assert_equal 'Wat is this', html
8989
end
9090

91+
def test_exports_default_anchor_schemes
92+
assert_equal SanitizationFilter::ANCHOR_SCHEMES, ['http', 'https', 'mailto', :relative, 'github-windows', 'github-mac']
93+
end
94+
9195
def test_script_contents_are_removed
9296
orig = '<script>JavaScript!</script>'
9397
assert_equal "", SanitizationFilter.call(orig).to_s

0 commit comments

Comments
 (0)