Class: Loofah::Scrubbers::NoReferrer
- Inherits:
-
Loofah::Scrubber
- Object
- Loofah::Scrubber
- Loofah::Scrubbers::NoReferrer
- Defined in:
- lib/loofah/scrubbers.rb
Overview
scrub!(:noreferrer)
+:noreferrer+ adds a rel="noreferrer" attribute to all links
link_farmers_markup = "ohai! <a href='http://www.myswarmysite.com/'>I like your blog post</a>"
Loofah.html5_fragment(link_farmers_markup).scrub!(:noreferrer)
=> "ohai! <a href='http://www.myswarmysite.com/' rel="noreferrer">I like your blog post</a>"
Constant Summary
Constants inherited from Loofah::Scrubber
Loofah::Scrubber::CONTINUE, Loofah::Scrubber::STOP
Instance Attribute Summary
Attributes inherited from Loofah::Scrubber
Instance Method Summary collapse
-
#initialize ⇒ NoReferrer
constructor
rubocop:disable Lint/MissingSuper.
- #scrub(node) ⇒ Object
Methods inherited from Loofah::Scrubber
Constructor Details
#initialize ⇒ NoReferrer
rubocop:disable Lint/MissingSuper
292 293 294 |
# File 'lib/loofah/scrubbers.rb', line 292 def initialize # rubocop:disable Lint/MissingSuper @direction = :top_down end |