Skip to content

Commit

Permalink
Permit del, ins, and s elements in sanitized HTML.
Browse files Browse the repository at this point in the history
  • Loading branch information
toddsundsted committed Nov 11, 2024
1 parent 3b6e840 commit d3ad170
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/framework/util_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Spectator.describe Ktistec::Util do
end

it "preserves supported tags" do
content = "<p>this is <span><strong>some</strong> <em>text</em></span></p>"
content = "<p>this is <span><strong>some</strong> <em>text</em> <sup>test</sup> <sub>test</sub> <del>test</del> <ins>test</ins> <s>test</s></span></p>"
expect(described_class.sanitize(content)).to eq(content)
end

Expand Down
2 changes: 1 addition & 1 deletion src/framework/util.cr
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module Ktistec
"ul", "ol", "li",
"dl", "dt", "dd",
"div", "span", "figure", "figcaption",
"strong", "em", "sup", "sub",
"strong", "em", "sup", "sub", "del", "ins", "s",
"blockquote",
"code", "pre",
"img",
Expand Down

0 comments on commit d3ad170

Please sign in to comment.