aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorTimm <kaspth@gmail.com>2013-07-10 16:55:38 +0200
committerTimm <kaspth@gmail.com>2014-06-15 23:40:17 +0200
commit4fbec83ff423c2bad37f9a4369c15efbaae55d43 (patch)
treedfeda4b54f020fd8c89a04e7ba65c2ef0503118a /actionview
parent4f6739887fb89af25b354b971c145a2316372fa1 (diff)
downloadrails-4fbec83ff423c2bad37f9a4369c15efbaae55d43.tar.gz
rails-4fbec83ff423c2bad37f9a4369c15efbaae55d43.tar.bz2
rails-4fbec83ff423c2bad37f9a4369c15efbaae55d43.zip
Added ActionView::Sanitizer and moved remove_xpaths to there.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb b/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
index eb353d79e2..21d13412c1 100644
--- a/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
+++ b/actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb
@@ -72,13 +72,6 @@ module ActionView
Loofah::HTML5::Scrub.scrub_css style_string
end
- def remove_xpaths(html, xpaths)
- html = Loofah.fragment(html) unless html.is_a? Nokogiri::XML::DocumentFragment
- xpaths.each do |xpath|
- html.xpath(xpath).each { |subtree| subtree.remove }
- end
- end
-
def protocol_separator
self.class.protocol_separator
end