lexxy 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
data/lib/lexxy/engine.rb CHANGED
@@ -11,11 +11,13 @@ module Lexxy
11
11
 
12
12
  # Rails versions that include Lexxy register it as an editor and allow its markup in
13
13
  # Action Text content themselves, so sanitizer lists are left to the application there.
14
- # This runs before Lexxy registers itself as an editor.
14
+ # This runs before Lexxy registers itself as an editor. The lists are set once the app
15
+ # has booted rather than when ActionText::Content loads, so code that sanitizes with them
16
+ # in a process without eager loading (development, test, rake tasks) sees Lexxy's markup.
15
17
  initializer "lexxy.sanitization", before: "lexxy.action_text_editor" do |app|
16
18
  next if app.config.action_text.editors&.key?(:lexxy)
17
19
 
18
- ActiveSupport.on_load(:action_text_content) do
20
+ app.config.after_initialize do
19
21
  default_allowed_tags = Class.new.include(ActionText::ContentHelper).new.sanitizer_allowed_tags
20
22
  ActionText::ContentHelper.allowed_tags = default_allowed_tags + %w[ s u video audio source embed table tbody tr th td ]
21
23
 
data/lib/lexxy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lexxy
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lexxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Manrubia