Skip to content

Commit

Permalink
Bump Sanitize library
Browse files Browse the repository at this point in the history
There have been improvements & bug fixes, and the API is mostly the same
  • Loading branch information
Mike Foley committed Aug 3, 2015
1 parent 51c1bf9 commit 1511749
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion html_terminator.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/html_terminator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1511749

Please sign in to comment.