From 4fbec83ff423c2bad37f9a4369c15efbaae55d43 Mon Sep 17 00:00:00 2001 From: Timm Date: Wed, 10 Jul 2013 16:55:38 +0200 Subject: Added ActionView::Sanitizer and moved remove_xpaths to there. --- actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb | 7 ------- 1 file changed, 7 deletions(-) (limited to 'actionview/lib') 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 -- cgit v1.2.3