mirror of https://github.com/rails/rails
Require `action_view/helpers` instead of `rails-html-sanitizer`
This will avoid a warning about circular dependencies. /circular require considered harmful.*rails-html-sanitizer/ This happens because `rails-html-sanitizer` requires `action_view/helpers` that requires `action_view/helpers/sanitize_helper` that requires `rails-html-sanitizer`. I'll properly fix this in rails-html-sanitizer later removing the code that needs to be added to ActionView::Helpers in that gem.
This commit is contained in:
parent
025a83e58b
commit
157f1df8fb
|
@ -10,7 +10,6 @@ module ActiveSupport
|
|||
PROJECT_ROOT = File.expand_path("../../../../", __dir__)
|
||||
ALLOWED_WARNINGS = Regexp.union(
|
||||
/circular require considered harmful.*delayed_job/, # Bug in delayed job.
|
||||
/circular require considered harmful.*rails-html-sanitizer/, # Bug when sprockets-rails is not required.
|
||||
|
||||
# Expected non-verbose warning emitted by Rails.
|
||||
/Ignoring .*\.yml because it has expired/,
|
||||
|
|
|
@ -308,12 +308,12 @@ module Rails
|
|||
end
|
||||
|
||||
if respond_to?(:action_view)
|
||||
require "rails-html-sanitizer"
|
||||
require "action_view/helpers"
|
||||
action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
|
||||
end
|
||||
|
||||
if respond_to?(:action_text)
|
||||
require "rails-html-sanitizer"
|
||||
require "action_view/helpers"
|
||||
action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
|
||||
end
|
||||
when "7.2"
|
||||
|
|
Loading…
Reference in New Issue