aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb')
-rw-r--r--actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb b/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
index c014219485..99d4e64346 100644
--- a/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
+++ b/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
@@ -57,7 +57,8 @@ module ActionView
return nil unless html
loofah_fragment = Loofah.fragment(html)
- if scrubber = options[:scrubber] # Loofah makes sure this is a scrubber
+ if scrubber = options[:scrubber]
+ # No duck typing, Loofah ensures subclass of Loofah::Scrubber
loofah_fragment.scrub!(scrubber)
elsif options[:tags] || options[:attributes]
@permit_scrubber.tags = options[:tags]