Skip to content

Commit

Permalink
Bump rails-html-sanitizer dependency to 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidstosik committed Oct 25, 2023
1 parent 37e35d9 commit f8f00c9
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
# frozen_string_literal: true

gem "rails-html-sanitizer", ">= 1.6.0"
require "rails-html-sanitizer"

module AppProfiler
module Viewer
class SpeedscopeRemoteViewer < BaseViewer
class BaseMiddleware
sanitizer_superclass = if Rails::Html::Sanitizer::VERSION >= "1.6.0" && Rails::HTML::Sanitizer.html5_support?
Rails::HTML5::SafeListSanitizer
else
Rails::Html::SafeListSanitizer
end

class Sanitizer < sanitizer_superclass
class Sanitizer < Rails::HTML::Sanitizer.best_supported_vendor.safe_list_sanitizer
self.allowed_tags = Set.new([
"strong", "em", "b", "i", "p", "code", "pre", "tt", "samp", "kbd", "var", "sub",
"sup", "dfn", "cite", "big", "small", "address", "hr", "br", "div", "span", "h1",
Expand Down

0 comments on commit f8f00c9

Please sign in to comment.