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.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb b/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
index 3f2cdd53e6..3ba46ccaa9 100644
--- a/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
+++ b/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
@@ -26,9 +26,9 @@ module ActionView
return nil unless html
return html if html.empty?
- fragment = Loofah.fragment(html)
- remove_xpaths(fragment, XPATHS_TO_REMOVE)
- fragment.text
+ Loofah.fragment(html).tap do |fragment|
+ remove_xpaths(fragment, XPATHS_TO_REMOVE)
+ end.text
end
end