Method: Loofah::Scrubbers::NoFollow#scrub

Defined in:
lib/loofah/scrubbers.rb

#scrub(node) ⇒ Object



225
226
227
228
229
230
# File 'lib/loofah/scrubbers.rb', line 225

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

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