Skip to content

Commit

Permalink
Merge pull request #182 from trevorrjohn/main
Browse files Browse the repository at this point in the history
Small simplification of flow
  • Loading branch information
flavorjones committed May 8, 2024
2 parents a105af7 + 2bfd407 commit 90ed5c4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/rails/html/scrubbers.rb
Expand Up @@ -140,9 +140,7 @@ def scrub_attribute(node, attr_node)
attr_node.node_name
end

if Loofah::HTML5::SafeList::ATTR_VAL_IS_URI.include?(attr_name)
return if Loofah::HTML5::Scrub.scrub_uri_attribute(attr_node)
end
return if Loofah::HTML5::SafeList::ATTR_VAL_IS_URI.include?(attr_name) && Loofah::HTML5::Scrub.scrub_uri_attribute(attr_node)

if Loofah::HTML5::SafeList::SVG_ATTR_VAL_ALLOWS_REF.include?(attr_name)
Loofah::HTML5::Scrub.scrub_attribute_that_allows_local_ref(attr_node)
Expand Down

0 comments on commit 90ed5c4

Please sign in to comment.