Class: Html::TargetScrubber
- Inherits:
-
PermitScrubber
- Object
- Loofah::Scrubber
- PermitScrubber
- Html::TargetScrubber
- Defined in:
- lib/html/sanitizer/scrubbers.rb
Overview
Html::TargetScrubber
Where Html::PermitScrubber picks out tags and attributes to permit in sanitization, Html::TargetScrubber targets them for removal.
tags=
If set, elements included will be stripped.
attributes=
If set, attributes included will be removed.
Instance Attribute Summary
Attributes inherited from PermitScrubber
Instance Method Summary collapse
Methods inherited from PermitScrubber
Constructor Details
This class inherits a constructor from Html::PermitScrubber
Instance Method Details
#allowed_node?(node) ⇒ Boolean
138 139 140 |
# File 'lib/html/sanitizer/scrubbers.rb', line 138 def allowed_node?(node) !@tags.include?(node.name) end |
#scrub_attribute?(name) ⇒ Boolean
142 143 144 |
# File 'lib/html/sanitizer/scrubbers.rb', line 142 def scrub_attribute?(name) @attributes.include?(name) end |