Skip to content

Commit 157f1df

Browse files
committed
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.
1 parent 025a83e commit 157f1df

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

activesupport/lib/active_support/testing/strict_warnings.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class WarningError < StandardError; end
1010
PROJECT_ROOT = File.expand_path("../../../../", __dir__)
1111
ALLOWED_WARNINGS = Regexp.union(
1212
/circular require considered harmful.*delayed_job/, # Bug in delayed job.
13-
/circular require considered harmful.*rails-html-sanitizer/, # Bug when sprockets-rails is not required.
1413

1514
# Expected non-verbose warning emitted by Rails.
1615
/Ignoring .*\.yml because it has expired/,

railties/lib/rails/application/configuration.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,12 @@ def load_defaults(target_version)
308308
end
309309

310310
if respond_to?(:action_view)
311-
require "rails-html-sanitizer"
311+
require "action_view/helpers"
312312
action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
313313
end
314314

315315
if respond_to?(:action_text)
316-
require "rails-html-sanitizer"
316+
require "action_view/helpers"
317317
action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
318318
end
319319
when "7.2"

0 commit comments

Comments
 (0)