aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r--actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb4
1 files changed, 3 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 f6c13885ff..251820b81b 100644
--- a/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
+++ b/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
@@ -1,4 +1,5 @@
require 'active_support/core_ext/class/attribute'
+require 'active_support/core_ext/object/blank'
require 'active_support/deprecation'
require 'action_view/helpers/sanitize_helper/scrubbers'
@@ -25,7 +26,7 @@ module ActionView
class FullSanitizer < Sanitizer
def sanitize(html, options = {})
return unless html
- return html if html.empty?
+ return html if html.blank?
Loofah.fragment(html).tap do |fragment|
remove_xpaths(fragment, XPATHS_TO_REMOVE)
@@ -51,6 +52,7 @@ module ActionView
def sanitize(html, options = {})
return unless html
+ return html if html.blank?
loofah_fragment = Loofah.fragment(html)