From 15117493cae90d7a4112d3247a7ae59183be319a Mon Sep 17 00:00:00 2001 From: Mike Foley Date: Mon, 3 Aug 2015 12:34:00 -0700 Subject: [PATCH] Bump Sanitize library There have been improvements & bug fixes, and the API is mostly the same --- html_terminator.gemspec | 2 +- lib/html_terminator.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html_terminator.gemspec b/html_terminator.gemspec index 44cfc95..b362c5c 100644 --- a/html_terminator.gemspec +++ b/html_terminator.gemspec @@ -21,5 +21,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency "bundler", "~> 1.3" spec.add_development_dependency "rake" - spec.add_runtime_dependency "sanitize" + spec.add_runtime_dependency "sanitize", "~> 4.0" end diff --git a/lib/html_terminator.rb b/lib/html_terminator.rb index 9dcf094..d6073e6 100644 --- a/lib/html_terminator.rb +++ b/lib/html_terminator.rb @@ -8,7 +8,7 @@ module HtmlTerminator def self.sanitize(val) if val.is_a?(String) && !skip_sanitize?(val) - Sanitize.clean(val, SANITIZE_OPTIONS).strip.gsub(/&/, "&") + Sanitize.fragment(val, SANITIZE_OPTIONS).strip.gsub(/&/, "&") else val end