diff options
author | Timm <kaspth@gmail.com> | 2013-08-09 18:12:25 +0200 |
---|---|---|
committer | Timm <kaspth@gmail.com> | 2014-06-16 21:04:02 +0200 |
commit | f428aeaa197aa5ec686d2f7103c0aadc883774d2 (patch) | |
tree | d8843c5ebfc502897ec93909d1691526dfea7141 /actionview/lib/action_view/helpers/sanitize_helper | |
parent | 3ca10618a0ca8f0fe55c62f367bef3a5dbe69f84 (diff) | |
download | rails-f428aeaa197aa5ec686d2f7103c0aadc883774d2.tar.gz rails-f428aeaa197aa5ec686d2f7103c0aadc883774d2.tar.bz2 rails-f428aeaa197aa5ec686d2f7103c0aadc883774d2.zip |
Changed explanation for no duck typing of custom scrubbers.
Diffstat (limited to 'actionview/lib/action_view/helpers/sanitize_helper')
-rw-r--r-- | actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb | 3 |
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] |