actiontext 7.0.8.7 → 7.2.2.1

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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -160
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +2 -2
  5. data/app/assets/javascripts/actiontext.esm.js +889 -0
  6. data/app/assets/javascripts/actiontext.js +55 -73
  7. data/app/assets/javascripts/trix.js +13718 -25
  8. data/app/assets/stylesheets/trix.css +67 -30
  9. data/app/helpers/action_text/content_helper.rb +28 -4
  10. data/app/helpers/action_text/tag_helper.rb +44 -30
  11. data/app/models/action_text/encrypted_rich_text.rb +4 -2
  12. data/app/models/action_text/record.rb +2 -0
  13. data/app/models/action_text/rich_text.rb +66 -6
  14. data/app/views/action_text/attachables/_content_attachment.html.erb +3 -0
  15. data/db/migrate/20180528164100_create_action_text_tables.rb +1 -1
  16. data/lib/action_text/attachable.rb +71 -5
  17. data/lib/action_text/attachables/content_attachment.rb +22 -18
  18. data/lib/action_text/attachables/missing_attachable.rb +19 -3
  19. data/lib/action_text/attachables/remote_image.rb +2 -0
  20. data/lib/action_text/attachment.rb +45 -2
  21. data/lib/action_text/attachment_gallery.rb +2 -0
  22. data/lib/action_text/attachments/caching.rb +2 -0
  23. data/lib/action_text/attachments/minification.rb +2 -0
  24. data/lib/action_text/attachments/trix_conversion.rb +2 -0
  25. data/lib/action_text/attribute.rb +40 -21
  26. data/lib/action_text/content.rb +68 -3
  27. data/lib/action_text/deprecator.rb +9 -0
  28. data/lib/action_text/encryption.rb +2 -0
  29. data/lib/action_text/engine.rb +17 -9
  30. data/lib/action_text/fixture_set.rb +35 -33
  31. data/lib/action_text/fragment.rb +8 -3
  32. data/lib/action_text/gem_version.rb +6 -4
  33. data/lib/action_text/html_conversion.rb +3 -1
  34. data/lib/action_text/plain_text_conversion.rb +2 -0
  35. data/lib/action_text/rendering.rb +7 -2
  36. data/lib/action_text/serialization.rb +2 -0
  37. data/lib/action_text/system_test_helper.rb +20 -17
  38. data/lib/action_text/trix_attachment.rb +4 -2
  39. data/lib/action_text/version.rb +3 -1
  40. data/lib/action_text.rb +19 -0
  41. data/lib/generators/action_text/install/install_generator.rb +29 -5
  42. data/lib/generators/action_text/install/templates/actiontext.css +0 -4
  43. data/lib/rails/generators/test_unit/install_generator.rb +2 -0
  44. data/package.json +7 -7
  45. metadata +16 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24518302c3909a97a1cd36a9ab7945be3f08ba7fc64e4157c9bcbb569ea48c28
4
- data.tar.gz: 5c0568c1d862c1e7f7b0039548cb529fed8d7fcd0cb161d174738c9d16afc3ec
3
+ metadata.gz: ae880abbc66a8b853cce05dc41d2962a78d7ce409fb7329a58f39bb1621cf4b2
4
+ data.tar.gz: 0eed3fd02e87093e9520e90577fe1fd560e0ef7da9eaa7ccb1e49751d50362ba
5
5
  SHA512:
6
- metadata.gz: da7bdf7d7b57e394fc7cca3e4b4a4f256265f1c1cbda0e917f0ddbb9ff2e0af01d865b8db69dcf31c694b1534b5561e0fffbe71cc0349d0781cb09b378d9d303
7
- data.tar.gz: fb280fe4907385d2afef2f634badca0c2064b5597fce3e45fc5b4e60b3f089f6cd8cb4ace96ae82685d2b5ec5b5024723c0257a28e2e833206dbaac412828498
6
+ metadata.gz: 9d2628de4f89b6f688536e657b1e89d058ae119b5c4f253b836cf51b96a35949bccc673e9a86f9e1dbc35013d66651534e1bb94460ce7374b88ef6575f22d5fa
7
+ data.tar.gz: ad9de254ed7ab1ceb550c44fbae23a594e2abbcaf3533460eb9ecb0544eda5024c6f7c7d3d576c13511bfc11ada6b69f5a75bbf3e1c31cd6afcb1d6121733977
data/CHANGELOG.md CHANGED
@@ -1,203 +1,85 @@
1
- ## Rails 7.0.8.7 (December 10, 2024) ##
1
+ ## Rails 7.2.2.1 (December 10, 2024) ##
2
2
 
3
- * Update vendored trix version to 1.3.4
3
+ * Update vendored trix version to 2.1.10
4
4
 
5
5
  *John Hawthorn*
6
6
 
7
7
 
8
- ## Rails 7.0.8.6 (October 23, 2024) ##
8
+ ## Rails 7.2.2 (October 30, 2024) ##
9
9
 
10
10
  * No changes.
11
11
 
12
12
 
13
- ## Rails 7.0.8.5 (October 15, 2024) ##
14
-
15
- * Avoid backtracing in plain_text_for_blockquote_node
16
-
17
- [CVE-2024-47888]
18
-
19
-
20
- ## Rails 7.0.8.4 (June 04, 2024) ##
21
-
22
- * No changes.
23
-
24
-
25
- ## Rails 7.0.8.3 (May 17, 2024) ##
26
-
27
- * Fix vendored trix.css to be correct file.
28
-
29
- *Hartley McGuire*
30
-
31
- ## Rails 7.0.8.2 (May 16, 2024) ##
32
-
33
- * Upgrade Trix to 1.3.2 to fix [CVE-2024-34341](https://github.com/basecamp/trix/security/advisories/GHSA-qjqp-xr96-cj99).
34
-
35
- *Rafael Mendonça França*
36
-
37
-
38
- ## Rails 7.0.8.1 (February 21, 2024) ##
39
-
40
- * No changes.
41
-
42
-
43
- ## Rails 7.0.8 (September 09, 2023) ##
44
-
45
- * No changes.
46
-
47
-
48
- ## Rails 7.0.7.2 (August 22, 2023) ##
49
-
50
- * No changes.
51
-
52
-
53
- ## Rails 7.0.7.1 (August 22, 2023) ##
54
-
55
- * No changes.
56
-
57
-
58
- ## Rails 7.0.7 (August 09, 2023) ##
59
-
60
- * No changes.
61
-
62
-
63
- ## Rails 7.0.6 (June 29, 2023) ##
64
-
65
- * No changes.
66
-
67
-
68
- ## Rails 7.0.5.1 (June 26, 2023) ##
69
-
70
- * No changes.
71
-
72
-
73
- ## Rails 7.0.5 (May 24, 2023) ##
74
-
75
- * Fix `ActionText::Attachable#as_json`.
76
-
77
- *Alexandre Ruban*
78
-
79
-
80
- ## Rails 7.0.4.3 (March 13, 2023) ##
81
-
82
- * No changes.
83
-
84
-
85
- ## Rails 7.0.4.2 (January 24, 2023) ##
13
+ ## Rails 7.2.1.2 (October 23, 2024) ##
86
14
 
87
15
  * No changes.
88
16
 
89
17
 
90
- ## Rails 7.0.4.1 (January 17, 2023) ##
18
+ ## Rails 7.2.1.1 (October 15, 2024) ##
91
19
 
92
- * No changes.
93
-
94
-
95
- ## Rails 7.0.4 (September 09, 2022) ##
96
-
97
- * No changes.
98
-
99
-
100
- ## Rails 7.0.3.1 (July 12, 2022) ##
101
-
102
- * No changes.
103
-
104
-
105
- ## Rails 7.0.3 (May 09, 2022) ##
106
-
107
- * No changes.
108
-
109
-
110
- ## Rails 7.0.2.4 (April 26, 2022) ##
111
-
112
- * No changes.
113
-
114
-
115
- ## Rails 7.0.2.3 (March 08, 2022) ##
116
-
117
- * No changes.
118
-
119
-
120
- ## Rails 7.0.2.2 (February 11, 2022) ##
121
-
122
- * No changes.
123
-
124
-
125
- ## Rails 7.0.2.1 (February 11, 2022) ##
126
-
127
- * No changes.
128
-
129
-
130
- ## Rails 7.0.2 (February 08, 2022) ##
131
-
132
- * No changes.
133
-
134
-
135
- ## Rails 7.0.1 (January 06, 2022) ##
136
-
137
- * No changes.
138
-
139
-
140
- ## Rails 7.0.0 (December 15, 2021) ##
141
-
142
- * No changes.
20
+ * Avoid backtracing in plain_text_for_blockquote_node
143
21
 
22
+ [CVE-2024-47888]
144
23
 
145
- ## Rails 7.0.0.rc3 (December 14, 2021) ##
24
+ *John Hawthorn*
146
25
 
147
- * No changes.
26
+ ## Rails 7.2.1 (August 22, 2024) ##
148
27
 
28
+ * Strip `content` attribute if the key is present but the value is empty
149
29
 
150
- ## Rails 7.0.0.rc2 (December 14, 2021) ##
30
+ *Jeremy Green*
151
31
 
152
- * No changes.
153
32
 
154
- ## Rails 7.0.0.rc1 (December 06, 2021) ##
33
+ ## Rails 7.2.0 (August 09, 2024) ##
34
+ * Only sanitize `content` attribute when present in attachments.
155
35
 
156
- * Fix an issue with how nested lists were displayed when converting to plain text
36
+ *Petrik de Heus*
157
37
 
158
- *Matt Swanson*
38
+ * Sanitize ActionText HTML ContentAttachment in Trix edit view
39
+ [CVE-2024-32464]
159
40
 
160
- * Allow passing in a custom `direct_upload_url` or `blob_url_template` to `rich_text_area_tag`.
41
+ *Aaron Patterson*, *Zack Deveau*
161
42
 
162
- *Lucas Mansur*
43
+ * Use `includes` instead of `eager_load` for `with_all_rich_text`.
163
44
 
45
+ *Petrik de Heus*
164
46
 
165
- ## Rails 7.0.0.alpha2 (September 15, 2021) ##
47
+ * Delegate `ActionText::Content#deconstruct` to `Nokogiri::XML::DocumentFragment#elements`.
166
48
 
167
- * No changes.
49
+ ```ruby
50
+ content = ActionText::Content.new <<~HTML
51
+ <h1>Hello, world</h1>
168
52
 
53
+ <div>The body</div>
54
+ HTML
169
55
 
170
- ## Rails 7.0.0.alpha1 (September 15, 2021) ##
56
+ content => [h1, div]
171
57
 
172
- * Make the Action Text + Trix JavaScript and CSS available through the asset pipeline.
58
+ assert_pattern { h1 => { content: "Hello, world" } }
59
+ assert_pattern { div => { content: "The body" } }
60
+ ```
173
61
 
174
- *DHH*
175
-
176
- * OpenSSL constants are now used for Digest computations.
62
+ *Sean Doyle*
177
63
 
178
- *Dirkjan Bussink*
64
+ * Fix all Action Text database related models to respect
65
+ `ActiveRecord::Base.table_name_prefix` configuration.
179
66
 
180
- * Add support for passing `form:` option to `rich_text_area_tag` and
181
- `rich_text_area` helpers to specify the `<input type="hidden" form="...">`
182
- value.
67
+ *Chedli Bourguiba*
183
68
 
184
- *Sean Doyle*
69
+ * Compile ESM package that can be used directly in the browser as actiontext.esm.js
185
70
 
186
- * Add `config.action_text.attachment_tag_name`, to specify the HTML tag that contains attachments.
71
+ *Matias Grunberg*
187
72
 
188
- *Mark VanLandingham*
73
+ * Fix using actiontext.js with Sprockets.
189
74
 
190
- * Expose how we render the HTML _surrounding_ rich text content as an
191
- extensible `layouts/action_view/contents/_content.html.erb` template to
192
- encourage user-land customizations, while retaining private API control over how
193
- the rich text itself is rendered by `action_text/contents/_content.html.erb`
194
- partial.
75
+ *Matias Grunberg*
195
76
 
196
- *Sean Doyle*
77
+ * Upgrade Trix to 2.0.7
197
78
 
198
- * Add `with_all_rich_text` method to eager load all rich text associations on a model at once.
79
+ *Hartley McGuire*
199
80
 
200
- *Matt Swanson*, *DHH*
81
+ * Fix using Trix with Sprockets.
201
82
 
83
+ *Hartley McGuire*
202
84
 
203
- Please check [6-1-stable](https://github.com/rails/rails/blob/6-1-stable/actiontext/CHANGELOG.md) for previous changes.
85
+ Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/actiontext/CHANGELOG.md) for previous changes.
data/MIT-LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2022 Basecamp, LLC
3
+ Copyright (c) 37signals LLC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Action Text
2
2
 
3
- Action Text brings rich text content and editing to Rails. It includes the [Trix editor](https://trix-editor.org) that handles everything from formatting to links to quotes to lists to embedded images and galleries. The rich text content generated by the Trix editor is saved in its own RichText model that's associated with any existing Active Record model in the application. Any embedded images (or other attachments) are automatically stored using Active Storage and associated with the included RichText model.
3
+ Action Text brings rich text content and editing to \Rails. It includes the [Trix editor](https://trix-editor.org) that handles everything from formatting to links to quotes to lists to embedded images and galleries. The rich text content generated by the Trix editor is saved in its own RichText model that's associated with any existing Active Record model in the application. Any embedded images (or other attachments) are automatically stored using Active Storage and associated with the included RichText model.
4
4
 
5
- You can read more about Action Text in the [Action Text Overview](https://edgeguides.rubyonrails.org/action_text_overview.html) guide.
5
+ You can read more about Action Text in the [Action Text Overview](https://guides.rubyonrails.org/action_text_overview.html) guide.
6
6
 
7
7
  ## Development
8
8