actiontext 7.2.0.beta1 → 7.2.0.beta2
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.
Potentially problematic release.
This version of actiontext might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/assets/javascripts/actiontext.esm.js +3 -3
- data/app/assets/javascripts/actiontext.js +3 -3
- data/app/helpers/action_text/content_helper.rb +9 -0
- data/lib/action_text/content.rb +2 -1
- data/lib/action_text/gem_version.rb +1 -1
- data/package.json +2 -2
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '038e42b13d583f9db670ee6dc104ef802f4c9c77920037b38a95fb28e9a625b4'
|
4
|
+
data.tar.gz: 31ee1edbf17eebb4ff96b83a4af0a296d80ea55244c5301e940f939ecaee4921
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8b926161af97aa1f62f17f6c775b045184af218452fb38243f0ca58713af6b313a51d6015651c8c9199ea148bf0ba80a825d0fb2e4cb9c17b1edc863efb6dc1
|
7
|
+
data.tar.gz: 2be0ecf3329ce40edf0e365082efb993c053a6d359877bc75ea9b953d569ed85730def05e950f03ffb644375004c4795067838a3240d4b6bfd102e622288c958
|
data/CHANGELOG.md
CHANGED
@@ -771,9 +771,9 @@ function start() {
|
|
771
771
|
}
|
772
772
|
|
773
773
|
function didClick(event) {
|
774
|
-
const
|
775
|
-
if (
|
776
|
-
submitButtonsByForm.set(
|
774
|
+
const button = event.target.closest("button, input");
|
775
|
+
if (button && button.type === "submit" && button.form) {
|
776
|
+
submitButtonsByForm.set(button.form, button);
|
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 button = event.target.closest("button, input");
|
757
|
+
if (button && button.type === "submit" && button.form) {
|
758
|
+
submitButtonsByForm.set(button.form, button);
|
759
759
|
}
|
760
760
|
}
|
761
761
|
function didSubmitForm(event) {
|
@@ -16,6 +16,15 @@ module ActionText
|
|
16
16
|
sanitize_action_text_content(render_action_text_attachments(content))
|
17
17
|
end
|
18
18
|
|
19
|
+
def sanitize_content_attachment(content_attachment)
|
20
|
+
sanitizer.sanitize(
|
21
|
+
content_attachment,
|
22
|
+
tags: sanitizer_allowed_tags,
|
23
|
+
attributes: sanitizer_allowed_attributes,
|
24
|
+
scrubber: scrubber,
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
19
28
|
def sanitize_action_text_content(content)
|
20
29
|
sanitizer.sanitize(
|
21
30
|
content.to_html,
|
data/lib/action_text/content.rb
CHANGED
@@ -22,7 +22,7 @@ module ActionText
|
|
22
22
|
# body.to_s # => "<h1>Funny times!</h1>"
|
23
23
|
# body.to_plain_text # => "Funny times!"
|
24
24
|
class Content
|
25
|
-
include Rendering, Serialization
|
25
|
+
include Rendering, Serialization, ContentHelper
|
26
26
|
|
27
27
|
attr_reader :fragment
|
28
28
|
|
@@ -97,6 +97,7 @@ module ActionText
|
|
97
97
|
|
98
98
|
def render_attachments(**options, &block)
|
99
99
|
content = fragment.replace(ActionText::Attachment.tag_name) do |node|
|
100
|
+
node["content"] = sanitize_content_attachment(node["content"])
|
100
101
|
block.call(attachment_for_node(node, **options))
|
101
102
|
end
|
102
103
|
self.class.new(content, canonicalize: false)
|
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rails/actiontext",
|
3
|
-
"version": "7.2.0-
|
3
|
+
"version": "7.2.0-beta2",
|
4
4
|
"description": "Edit and display rich text in Rails applications",
|
5
5
|
"module": "app/assets/javascripts/actiontext.esm.js",
|
6
6
|
"main": "app/assets/javascripts/actiontext.js",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
],
|
23
23
|
"license": "MIT",
|
24
24
|
"dependencies": {
|
25
|
-
"@rails/activestorage": ">= 7.
|
25
|
+
"@rails/activestorage": ">= 7.2.0-alpha"
|
26
26
|
},
|
27
27
|
"peerDependencies": {
|
28
28
|
"trix": "^2.0.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actiontext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.2.0.
|
4
|
+
version: 7.2.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javan Makhmali
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-06-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -18,56 +18,56 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 7.2.0.
|
21
|
+
version: 7.2.0.beta2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 7.2.0.
|
28
|
+
version: 7.2.0.beta2
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: activerecord
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 7.2.0.
|
35
|
+
version: 7.2.0.beta2
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 7.2.0.
|
42
|
+
version: 7.2.0.beta2
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: activestorage
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 7.2.0.
|
49
|
+
version: 7.2.0.beta2
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 7.2.0.
|
56
|
+
version: 7.2.0.beta2
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: actionpack
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 7.2.0.
|
63
|
+
version: 7.2.0.beta2
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 7.2.0.
|
70
|
+
version: 7.2.0.beta2
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: nokogiri
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,10 +163,10 @@ licenses:
|
|
163
163
|
- MIT
|
164
164
|
metadata:
|
165
165
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
166
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.2.0.
|
167
|
-
documentation_uri: https://api.rubyonrails.org/v7.2.0.
|
166
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.2.0.beta2/actiontext/CHANGELOG.md
|
167
|
+
documentation_uri: https://api.rubyonrails.org/v7.2.0.beta2/
|
168
168
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
169
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.2.0.
|
169
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.2.0.beta2/actiontext
|
170
170
|
rubygems_mfa_required: 'true'
|
171
171
|
post_install_message:
|
172
172
|
rdoc_options: []
|
@@ -179,11 +179,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: 3.1.0
|
180
180
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
181
|
requirements:
|
182
|
-
- - "
|
182
|
+
- - ">"
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version:
|
184
|
+
version: 1.3.1
|
185
185
|
requirements: []
|
186
|
-
rubygems_version: 3.
|
186
|
+
rubygems_version: 3.3.27
|
187
187
|
signing_key:
|
188
188
|
specification_version: 4
|
189
189
|
summary: Rich text framework.
|