diff options
author | Timm <kaspth@gmail.com> | 2013-07-10 16:55:38 +0200 |
---|---|---|
committer | Timm <kaspth@gmail.com> | 2014-06-15 23:40:17 +0200 |
commit | 4fbec83ff423c2bad37f9a4369c15efbaae55d43 (patch) | |
tree | dfeda4b54f020fd8c89a04e7ba65c2ef0503118a /actionview/lib/action_view/helpers/sanitize_helper | |
parent | 4f6739887fb89af25b354b971c145a2316372fa1 (diff) | |
download | rails-4fbec83ff423c2bad37f9a4369c15efbaae55d43.tar.gz rails-4fbec83ff423c2bad37f9a4369c15efbaae55d43.tar.bz2 rails-4fbec83ff423c2bad37f9a4369c15efbaae55d43.zip |
Added ActionView::Sanitizer and moved remove_xpaths to there.
Diffstat (limited to 'actionview/lib/action_view/helpers/sanitize_helper')
-rw-r--r-- | actionview/lib/action_view/helpers/sanitize_helper/sanitizers.rb | 7 |
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 |