actiontext 7.1.5.1 → 7.2.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actiontext might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -136
- data/app/assets/javascripts/actiontext.esm.js +3 -3
- data/app/assets/javascripts/actiontext.js +3 -3
- data/app/assets/javascripts/trix.js +203 -1758
- data/app/helpers/action_text/content_helper.rb +2 -9
- data/app/helpers/action_text/tag_helper.rb +38 -28
- data/app/models/action_text/encrypted_rich_text.rb +2 -2
- data/app/models/action_text/record.rb +2 -0
- data/app/models/action_text/rich_text.rb +58 -26
- data/db/migrate/20180528164100_create_action_text_tables.rb +1 -1
- data/lib/action_text/attachable.rb +35 -33
- data/lib/action_text/attachables/content_attachment.rb +2 -0
- data/lib/action_text/attachables/missing_attachable.rb +2 -0
- data/lib/action_text/attachables/remote_image.rb +2 -0
- data/lib/action_text/attachment.rb +27 -25
- data/lib/action_text/attachment_gallery.rb +2 -0
- data/lib/action_text/attachments/caching.rb +2 -0
- data/lib/action_text/attachments/minification.rb +2 -0
- data/lib/action_text/attachments/trix_conversion.rb +2 -0
- data/lib/action_text/attribute.rb +36 -22
- data/lib/action_text/content.rb +47 -31
- data/lib/action_text/deprecator.rb +2 -0
- data/lib/action_text/encryption.rb +2 -0
- data/lib/action_text/engine.rb +2 -0
- data/lib/action_text/fixture_set.rb +34 -34
- data/lib/action_text/fragment.rb +4 -0
- data/lib/action_text/gem_version.rb +6 -4
- data/lib/action_text/html_conversion.rb +2 -0
- data/lib/action_text/plain_text_conversion.rb +3 -6
- data/lib/action_text/rendering.rb +2 -0
- data/lib/action_text/serialization.rb +2 -0
- data/lib/action_text/system_test_helper.rb +20 -17
- data/lib/action_text/trix_attachment.rb +2 -0
- data/lib/action_text/version.rb +3 -1
- data/lib/generators/action_text/install/install_generator.rb +10 -3
- data/lib/rails/generators/test_unit/install_generator.rb +2 -0
- data/package.json +1 -1
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d497d50205633b66005bfcfe850ee8d5404c0b3b9f953a14356bb912c8b3b4d5
|
4
|
+
data.tar.gz: '099e3d4dca02f13983f06b8ffcf6c49a1bb2f3cb66ae94e8534c0764f8b56700'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9acfe56af6ec22cf0448fc42c7dc3cba769bbbce316efa926869ac083db8491a547366ae5beede3da8a02b75c1cbb6f7a8e252c0519fbd7c282af841835a644
|
7
|
+
data.tar.gz: 9beaaede36bf8158e2fee2e6d5f2fb02dbaabeb86a279ee7ca0e9ef87b5cc710d3ea454ae3e8723235eb8b2d2bc2586e540f89623c2609fd3620207e2785c042
|
data/CHANGELOG.md
CHANGED
@@ -1,71 +1,32 @@
|
|
1
|
-
## Rails 7.
|
1
|
+
## Rails 7.2.0.beta1 (May 29, 2024) ##
|
2
2
|
|
3
|
-
*
|
4
|
-
|
5
|
-
*John Hawthorn*
|
6
|
-
|
7
|
-
|
8
|
-
## Rails 7.1.5 (October 30, 2024) ##
|
9
|
-
|
10
|
-
* No changes.
|
11
|
-
|
12
|
-
|
13
|
-
## Rails 7.1.4.2 (October 23, 2024) ##
|
14
|
-
|
15
|
-
* No changes.
|
16
|
-
|
17
|
-
|
18
|
-
## Rails 7.1.4.1 (October 15, 2024) ##
|
19
|
-
|
20
|
-
* Avoid backtracing in plain_text_for_blockquote_node
|
21
|
-
|
22
|
-
[CVE-2024-47888]
|
23
|
-
|
24
|
-
*John Hawthorn*
|
25
|
-
|
26
|
-
## Rails 7.1.4 (August 22, 2024) ##
|
27
|
-
|
28
|
-
* Strip `content` attribute if the key is present but the value is empty
|
29
|
-
|
30
|
-
*Jeremy Green*
|
31
|
-
|
32
|
-
* Only sanitize `content` attribute when present in attachments.
|
3
|
+
* Use `includes` instead of `eager_load` for `with_all_rich_text`.
|
33
4
|
|
34
5
|
*Petrik de Heus*
|
35
6
|
|
7
|
+
* Delegate `ActionText::Content#deconstruct` to `Nokogiri::XML::DocumentFragment#elements`.
|
36
8
|
|
37
|
-
|
9
|
+
```ruby
|
10
|
+
content = ActionText::Content.new <<~HTML
|
11
|
+
<h1>Hello, world</h1>
|
38
12
|
|
39
|
-
|
40
|
-
|
13
|
+
<div>The body</div>
|
14
|
+
HTML
|
41
15
|
|
42
|
-
|
16
|
+
content => [h1, div]
|
43
17
|
|
44
|
-
|
18
|
+
assert_pattern { h1 => { content: "Hello, world" } }
|
19
|
+
assert_pattern { div => { content: "The body" } }
|
20
|
+
```
|
45
21
|
|
46
|
-
*
|
47
|
-
|
48
|
-
*Rafael Mendonça França*
|
49
|
-
|
50
|
-
|
51
|
-
## Rails 7.1.3.2 (February 21, 2024) ##
|
52
|
-
|
53
|
-
* No changes.
|
54
|
-
|
55
|
-
|
56
|
-
## Rails 7.1.3.1 (February 21, 2024) ##
|
57
|
-
|
58
|
-
* No changes.
|
59
|
-
|
60
|
-
|
61
|
-
## Rails 7.1.3 (January 16, 2024) ##
|
62
|
-
|
63
|
-
* No changes.
|
22
|
+
*Sean Doyle*
|
64
23
|
|
24
|
+
* Fix all Action Text database related models to respect
|
25
|
+
`ActiveRecord::Base.table_name_prefix` configuration.
|
65
26
|
|
66
|
-
|
27
|
+
*Chedli Bourguiba*
|
67
28
|
|
68
|
-
* Compile ESM package that can be used directly in the browser as
|
29
|
+
* Compile ESM package that can be used directly in the browser as actiontext.esm.js
|
69
30
|
|
70
31
|
*Matias Grunberg*
|
71
32
|
|
@@ -73,7 +34,7 @@
|
|
73
34
|
|
74
35
|
*Matias Grunberg*
|
75
36
|
|
76
|
-
* Upgrade Trix to 2.0.7
|
37
|
+
* Upgrade Trix to 2.0.7
|
77
38
|
|
78
39
|
*Hartley McGuire*
|
79
40
|
|
@@ -81,82 +42,4 @@
|
|
81
42
|
|
82
43
|
*Hartley McGuire*
|
83
44
|
|
84
|
-
|
85
|
-
## Rails 7.1.1 (October 11, 2023) ##
|
86
|
-
|
87
|
-
* No changes.
|
88
|
-
|
89
|
-
|
90
|
-
## Rails 7.1.0 (October 05, 2023) ##
|
91
|
-
|
92
|
-
* No changes.
|
93
|
-
|
94
|
-
|
95
|
-
## Rails 7.1.0.rc2 (October 01, 2023) ##
|
96
|
-
|
97
|
-
* No changes.
|
98
|
-
|
99
|
-
|
100
|
-
## Rails 7.1.0.rc1 (September 27, 2023) ##
|
101
|
-
|
102
|
-
* No changes.
|
103
|
-
|
104
|
-
|
105
|
-
## Rails 7.1.0.beta1 (September 13, 2023) ##
|
106
|
-
|
107
|
-
* Use `Rails::HTML5::SafeListSanitizer` by default in the Rails 7.1 configuration if it is
|
108
|
-
supported.
|
109
|
-
|
110
|
-
Action Text's sanitizer can be configured by setting
|
111
|
-
`config.action_text.sanitizer_vendor`. Supported values are `Rails::HTML4::Sanitizer` or
|
112
|
-
`Rails::HTML5::Sanitizer`.
|
113
|
-
|
114
|
-
The Rails 7.1 configuration will set this to `Rails::HTML5::Sanitizer` when it is supported, and
|
115
|
-
fall back to `Rails::HTML4::Sanitizer`. Previous configurations default to
|
116
|
-
`Rails::HTML4::Sanitizer`.
|
117
|
-
|
118
|
-
As a result of this change, the defaults for `ActionText::ContentHelper.allowed_tags` and
|
119
|
-
`.allowed_attributes` are applied at runtime, so the value of these attributes is now 'nil'
|
120
|
-
unless set by the application. You may call `sanitizer_allowed_tags` or
|
121
|
-
`sanitizer_allowed_attributes` to inspect the tags and attributes being allowed by the
|
122
|
-
sanitizer.
|
123
|
-
|
124
|
-
*Mike Dalessio*
|
125
|
-
|
126
|
-
* Attachables now can override default attachment missing template.
|
127
|
-
|
128
|
-
When rendering Action Text attachments where the underlying attachable model has
|
129
|
-
been removed, a fallback template is used. You now can override this template on
|
130
|
-
a per-model basis. For example, you could render a placeholder image for a file
|
131
|
-
attachment or the text "Deleted User" for a User attachment.
|
132
|
-
|
133
|
-
*Matt Swanson*, *Joel Drapper*
|
134
|
-
|
135
|
-
* Update bundled Trix version from `1.3.1` to `2.0.4`.
|
136
|
-
|
137
|
-
*Sarah Ridge*, *Sean Doyle*
|
138
|
-
|
139
|
-
* Apply `field_error_proc` to `rich_text_area` form fields.
|
140
|
-
|
141
|
-
*Kaíque Kandy Koga*
|
142
|
-
|
143
|
-
* Action Text attachment URLs rendered in a background job (a la Turbo
|
144
|
-
Streams) now use `Rails.application.default_url_options` and
|
145
|
-
`Rails.application.config.force_ssl` instead of `http://example.org`.
|
146
|
-
|
147
|
-
*Jonathan Hefner*
|
148
|
-
|
149
|
-
* Support `strict_loading:` option for `has_rich_text` declaration
|
150
|
-
|
151
|
-
*Sean Doyle*
|
152
|
-
|
153
|
-
* Update ContentAttachment so that it can encapsulate arbitrary HTML content in a document.
|
154
|
-
|
155
|
-
*Jamis Buck*
|
156
|
-
|
157
|
-
* Fix an issue that caused the content layout to render multiple times when a
|
158
|
-
rich_text field was updated.
|
159
|
-
|
160
|
-
*Jacob Herrington*
|
161
|
-
|
162
|
-
Please check [7-0-stable](https://github.com/rails/rails/blob/7-0-stable/actiontext/CHANGELOG.md) for previous changes.
|
45
|
+
Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/actiontext/CHANGELOG.md) for previous changes.
|
@@ -771,9 +771,9 @@ function start() {
|
|
771
771
|
}
|
772
772
|
|
773
773
|
function didClick(event) {
|
774
|
-
const
|
775
|
-
if (
|
776
|
-
submitButtonsByForm.set(
|
774
|
+
const {target: target} = event;
|
775
|
+
if ((target.tagName == "INPUT" || target.tagName == "BUTTON") && target.type == "submit" && target.form) {
|
776
|
+
submitButtonsByForm.set(target.form, target);
|
777
777
|
}
|
778
778
|
}
|
779
779
|
|
@@ -753,9 +753,9 @@
|
|
753
753
|
}
|
754
754
|
}
|
755
755
|
function didClick(event) {
|
756
|
-
const
|
757
|
-
if (
|
758
|
-
submitButtonsByForm.set(
|
756
|
+
const {target: target} = event;
|
757
|
+
if ((target.tagName == "INPUT" || target.tagName == "BUTTON") && target.type == "submit" && target.form) {
|
758
|
+
submitButtonsByForm.set(target.form, target);
|
759
759
|
}
|
760
760
|
}
|
761
761
|
function didSubmitForm(event) {
|