Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed Dec 27, 2022
1 parent e632246 commit c27ed47
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/sanitization_filter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,24 @@ def test_custom_anchor_schemes_are_not_removed

def test_allow_svg_elements_to_be_added
config = DEFAULT_CONFIG.dup
frag = <<~FRAG
<svg height="100" width="100">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>
frag = <<~FRAG
<svg height="100" width="100">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>
FRAG

html = SanitizationFilter.call(frag, config)

assert_equal("\n", html)

config = { elements: ["svg", "circle"],
attributes: { "svg" => ["width"],
"circle" => ["cx", "cy", "r"], }, }
attributes: { "svg" => ["width"],
"circle" => ["cx", "cy", "r"], }, }

result = <<~FRAG
<svg width="100">
<circle cx="50" cy="50" r="40" />
</svg>
<svg width="100">
<circle cx="50" cy="50" r="40" />
</svg>
FRAG

html = SanitizationFilter.call(frag, config)
Expand Down

0 comments on commit c27ed47

Please sign in to comment.