diff options
author | Chris LaRose <cjlarose@gmail.com> | 2019-03-06 17:25:28 -0800 |
---|---|---|
committer | Chris LaRose <cjlarose@gmail.com> | 2019-03-06 17:32:03 -0800 |
commit | c03a50ade38865d77d87f60f4a4d7824277ad071 (patch) | |
tree | 9e27f4db8dbd9b32c08d71da5e0770ebba1f6ab9 /actiontext/app | |
parent | 21703382393c87212c27c988420ee5c133c1aa9f (diff) | |
download | rails-c03a50ade38865d77d87f60f4a4d7824277ad071.tar.gz rails-c03a50ade38865d77d87f60f4a4d7824277ad071.tar.bz2 rails-c03a50ade38865d77d87f60f4a4d7824277ad071.zip |
Explicitly require rails-html-sanitizer gem in ActionText helpers
If the [`action_text.helper` initializer][0] runs after
`ActionController::Base` has been loaded, but before the
`rails-html-sanitizer` gem has been `require`d, then the reference to
the constant `Rails::Html` in the body of the
`ActionText::ContentHelper` module raises an `uninitialized constant`
exception.
[0]: https://github.com/rails/rails/blob/21703382393c87212c27c988420ee5c133c1aa9f/actiontext/lib/action_text/engine.rb#L31-L35
Diffstat (limited to 'actiontext/app')
-rw-r--r-- | actiontext/app/helpers/action_text/content_helper.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actiontext/app/helpers/action_text/content_helper.rb b/actiontext/app/helpers/action_text/content_helper.rb index b3335601f9..2005033d5c 100644 --- a/actiontext/app/helpers/action_text/content_helper.rb +++ b/actiontext/app/helpers/action_text/content_helper.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "rails-html-sanitizer" + module ActionText module ContentHelper SANITIZER = Rails::Html::Sanitizer.white_list_sanitizer |