Method: Loofah::Scrubbers::NoOpener#scrub

Defined in:
lib/loofah/scrubbers.rb

#scrub(node) ⇒ Object



276
277
278
279
280
281
# File 'lib/loofah/scrubbers.rb', line 276

def scrub(node)
  return CONTINUE unless (node.type == Nokogiri::XML::Node::ELEMENT_NODE) && (node.name == "a")

  append_attribute(node, "rel", "noopener")
  STOP
end