actiontext 7.0.8.1 → 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 +43 -124
  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 +13612 -5170
  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 +5 -3
  33. data/lib/action_text/html_conversion.rb +3 -1
  34. data/lib/action_text/plain_text_conversion.rb +8 -1
  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 +21 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7fef0f001faabf9fa1e33b44cdc8e1fc3aece932de78ca418187c8725b429f61
4
- data.tar.gz: 19abfbfb01e7a37ac120906a35fb40c3b7e787a3d294a249bd50f80c1699b3c2
3
+ metadata.gz: ae880abbc66a8b853cce05dc41d2962a78d7ce409fb7329a58f39bb1621cf4b2
4
+ data.tar.gz: 0eed3fd02e87093e9520e90577fe1fd560e0ef7da9eaa7ccb1e49751d50362ba
5
5
  SHA512:
6
- metadata.gz: 61848f87ea52bf7872122df668d45f986de800726cbb1dc776cee69017abdd844e895de13869a8aea00f3a80148cee7ca7b5bf98fa6c8e17dfe8f11d170d8c27
7
- data.tar.gz: cc65cb531964b618ce858cf00cbcbfd4a22540ffe55f7c3302e2ade5b9a1956212ecb8675f8f203766f34c512cf6a412f7a8773ada39c9117ec5b4079e1edc88
6
+ metadata.gz: 9d2628de4f89b6f688536e657b1e89d058ae119b5c4f253b836cf51b96a35949bccc673e9a86f9e1dbc35013d66651534e1bb94460ce7374b88ef6575f22d5fa
7
+ data.tar.gz: ad9de254ed7ab1ceb550c44fbae23a594e2abbcaf3533460eb9ecb0544eda5024c6f7c7d3d576c13511bfc11ada6b69f5a75bbf3e1c31cd6afcb1d6121733977
data/CHANGELOG.md CHANGED
@@ -1,166 +1,85 @@
1
- ## Rails 7.0.8.1 (February 21, 2024) ##
2
-
3
- * No changes.
4
-
5
-
6
- ## Rails 7.0.8 (September 09, 2023) ##
7
-
8
- * No changes.
9
-
10
-
11
- ## Rails 7.0.7.2 (August 22, 2023) ##
12
-
13
- * No changes.
14
-
15
-
16
- ## Rails 7.0.7.1 (August 22, 2023) ##
17
-
18
- * No changes.
19
-
20
-
21
- ## Rails 7.0.7 (August 09, 2023) ##
22
-
23
- * No changes.
24
-
25
-
26
- ## Rails 7.0.6 (June 29, 2023) ##
27
-
28
- * No changes.
29
-
30
-
31
- ## Rails 7.0.5.1 (June 26, 2023) ##
32
-
33
- * No changes.
34
-
35
-
36
- ## Rails 7.0.5 (May 24, 2023) ##
37
-
38
- * Fix `ActionText::Attachable#as_json`.
39
-
40
- *Alexandre Ruban*
41
-
42
-
43
- ## Rails 7.0.4.3 (March 13, 2023) ##
44
-
45
- * No changes.
46
-
47
-
48
- ## Rails 7.0.4.2 (January 24, 2023) ##
49
-
50
- * No changes.
1
+ ## Rails 7.2.2.1 (December 10, 2024) ##
51
2
 
3
+ * Update vendored trix version to 2.1.10
52
4
 
53
- ## Rails 7.0.4.1 (January 17, 2023) ##
5
+ *John Hawthorn*
54
6
 
55
- * No changes.
56
-
57
-
58
- ## Rails 7.0.4 (September 09, 2022) ##
59
-
60
- * No changes.
61
-
62
-
63
- ## Rails 7.0.3.1 (July 12, 2022) ##
64
-
65
- * No changes.
66
-
67
-
68
- ## Rails 7.0.3 (May 09, 2022) ##
69
-
70
- * No changes.
71
-
72
-
73
- ## Rails 7.0.2.4 (April 26, 2022) ##
74
-
75
- * No changes.
76
-
77
-
78
- ## Rails 7.0.2.3 (March 08, 2022) ##
79
7
 
80
- * No changes.
81
-
82
-
83
- ## Rails 7.0.2.2 (February 11, 2022) ##
8
+ ## Rails 7.2.2 (October 30, 2024) ##
84
9
 
85
10
  * No changes.
86
11
 
87
12
 
88
- ## Rails 7.0.2.1 (February 11, 2022) ##
13
+ ## Rails 7.2.1.2 (October 23, 2024) ##
89
14
 
90
15
  * No changes.
91
16
 
92
17
 
93
- ## Rails 7.0.2 (February 08, 2022) ##
94
-
95
- * No changes.
96
-
18
+ ## Rails 7.2.1.1 (October 15, 2024) ##
97
19
 
98
- ## Rails 7.0.1 (January 06, 2022) ##
20
+ * Avoid backtracing in plain_text_for_blockquote_node
99
21
 
100
- * No changes.
22
+ [CVE-2024-47888]
101
23
 
24
+ *John Hawthorn*
102
25
 
103
- ## Rails 7.0.0 (December 15, 2021) ##
26
+ ## Rails 7.2.1 (August 22, 2024) ##
104
27
 
105
- * No changes.
28
+ * Strip `content` attribute if the key is present but the value is empty
106
29
 
30
+ *Jeremy Green*
107
31
 
108
- ## Rails 7.0.0.rc3 (December 14, 2021) ##
109
32
 
110
- * No changes.
33
+ ## Rails 7.2.0 (August 09, 2024) ##
34
+ * Only sanitize `content` attribute when present in attachments.
111
35
 
36
+ *Petrik de Heus*
112
37
 
113
- ## Rails 7.0.0.rc2 (December 14, 2021) ##
38
+ * Sanitize ActionText HTML ContentAttachment in Trix edit view
39
+ [CVE-2024-32464]
114
40
 
115
- * No changes.
41
+ *Aaron Patterson*, *Zack Deveau*
116
42
 
117
- ## Rails 7.0.0.rc1 (December 06, 2021) ##
43
+ * Use `includes` instead of `eager_load` for `with_all_rich_text`.
118
44
 
119
- * Fix an issue with how nested lists were displayed when converting to plain text
45
+ *Petrik de Heus*
120
46
 
121
- *Matt Swanson*
47
+ * Delegate `ActionText::Content#deconstruct` to `Nokogiri::XML::DocumentFragment#elements`.
122
48
 
123
- * Allow passing in a custom `direct_upload_url` or `blob_url_template` to `rich_text_area_tag`.
49
+ ```ruby
50
+ content = ActionText::Content.new <<~HTML
51
+ <h1>Hello, world</h1>
124
52
 
125
- *Lucas Mansur*
53
+ <div>The body</div>
54
+ HTML
126
55
 
56
+ content => [h1, div]
127
57
 
128
- ## Rails 7.0.0.alpha2 (September 15, 2021) ##
58
+ assert_pattern { h1 => { content: "Hello, world" } }
59
+ assert_pattern { div => { content: "The body" } }
60
+ ```
129
61
 
130
- * No changes.
131
-
132
-
133
- ## Rails 7.0.0.alpha1 (September 15, 2021) ##
134
-
135
- * Make the Action Text + Trix JavaScript and CSS available through the asset pipeline.
136
-
137
- *DHH*
138
-
139
- * OpenSSL constants are now used for Digest computations.
62
+ *Sean Doyle*
140
63
 
141
- *Dirkjan Bussink*
64
+ * Fix all Action Text database related models to respect
65
+ `ActiveRecord::Base.table_name_prefix` configuration.
142
66
 
143
- * Add support for passing `form:` option to `rich_text_area_tag` and
144
- `rich_text_area` helpers to specify the `<input type="hidden" form="...">`
145
- value.
67
+ *Chedli Bourguiba*
146
68
 
147
- *Sean Doyle*
69
+ * Compile ESM package that can be used directly in the browser as actiontext.esm.js
148
70
 
149
- * Add `config.action_text.attachment_tag_name`, to specify the HTML tag that contains attachments.
71
+ *Matias Grunberg*
150
72
 
151
- *Mark VanLandingham*
73
+ * Fix using actiontext.js with Sprockets.
152
74
 
153
- * Expose how we render the HTML _surrounding_ rich text content as an
154
- extensible `layouts/action_view/contents/_content.html.erb` template to
155
- encourage user-land customizations, while retaining private API control over how
156
- the rich text itself is rendered by `action_text/contents/_content.html.erb`
157
- partial.
75
+ *Matias Grunberg*
158
76
 
159
- *Sean Doyle*
77
+ * Upgrade Trix to 2.0.7
160
78
 
161
- * Add `with_all_rich_text` method to eager load all rich text associations on a model at once.
79
+ *Hartley McGuire*
162
80
 
163
- *Matt Swanson*, *DHH*
81
+ * Fix using Trix with Sprockets.
164
82
 
83
+ *Hartley McGuire*
165
84
 
166
- 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