Skip to content

Commit 2bfd407

Browse files
committed
Small simplification
1 parent a105af7 commit 2bfd407

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/rails/html/scrubbers.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,7 @@ def scrub_attribute(node, attr_node)
140140
attr_node.node_name
141141
end
142142

143-
if Loofah::HTML5::SafeList::ATTR_VAL_IS_URI.include?(attr_name)
144-
return if Loofah::HTML5::Scrub.scrub_uri_attribute(attr_node)
145-
end
143+
return if Loofah::HTML5::SafeList::ATTR_VAL_IS_URI.include?(attr_name) && Loofah::HTML5::Scrub.scrub_uri_attribute(attr_node)
146144

147145
if Loofah::HTML5::SafeList::SVG_ATTR_VAL_ALLOWS_REF.include?(attr_name)
148146
Loofah::HTML5::Scrub.scrub_attribute_that_allows_local_ref(attr_node)

0 commit comments

Comments
 (0)