aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers
diff options
context:
space:
mode:
authorTimm <kaspth@gmail.com>2013-08-17 11:02:09 +0200
committerTimm <kaspth@gmail.com>2014-06-16 21:04:10 +0200
commit62171784fe374d101aa7cfcb0d1e32c89a3629f8 (patch)
treedaef8553fa9c9bf8f87cfb85453b41d827866c02 /actionview/lib/action_view/helpers
parentc1a786493021b184ebd5729eb21979eab1f774e4 (diff)
downloadrails-62171784fe374d101aa7cfcb0d1e32c89a3629f8.tar.gz
rails-62171784fe374d101aa7cfcb0d1e32c89a3629f8.tar.bz2
rails-62171784fe374d101aa7cfcb0d1e32c89a3629f8.zip
Simplified the removal of xpaths in remove_xpaths. Added more tests for remove_xpaths.
Diffstat (limited to 'actionview/lib/action_view/helpers')
-rw-r--r--actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb2
1 files changed, 1 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 01ab9830f3..75ba1a7deb 100644
--- a/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
+++ b/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
@@ -13,7 +13,7 @@ module ActionView
def remove_xpaths(html, xpaths)
if html.respond_to?(:xpath)
- xpaths.each { |xpath| html.xpath(xpath).remove }
+ html.xpath(*xpaths).remove
html
else
remove_xpaths(Loofah.fragment(html), xpaths).to_s