Skip to content

Commit

Permalink
fix: use Loofah.fragment for HTML4 parsing
Browse files Browse the repository at this point in the history
to maintain backwards compatibility with older version of Loofah
  • Loading branch information
flavorjones committed May 20, 2023
1 parent d5ac27e commit 2b1890f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rails/html/sanitizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def sanitize(html, options = {})
module Parser
module HTML4
def parse_fragment(html)
Loofah.html4_fragment(html)
Loofah.fragment(html) # TODO: update to html4_fragment when we require Loofah >= 2.21
end
end

Expand Down

0 comments on commit 2b1890f

Please sign in to comment.