editor_js 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/editor_js/blocks/embed_block.rb +6 -2
- data/lib/editor_js/blocks/image_block.rb +7 -1
- data/lib/editor_js/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77738c455a6cc79eb1b2a20874baf3577f55c327ad9eb6447f6f494a175ad0ef
|
4
|
+
data.tar.gz: '093553c9c3ef1847fd251f8c005b2598acea27104d29d1e5075eddf0af171dd1'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97e69bbab2ec94c7055f0905bed3f5a0d7160f9a0da8cabfcfce4ff511fc04bd3553702e795b9d7b606f4418e1099638497a10c7becf6cba9cc81b54deb9b2dd
|
7
|
+
data.tar.gz: 21aea8e610a98441b4c59096139b138131f6b310634353227ffa299d0c20ea1e6f3902d5c997b67e06777648ee63119cef43f85cb8b3be67499a1a5bba58e68b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
editor_js (0.2.
|
4
|
+
editor_js (0.2.3)
|
5
5
|
actionview (>= 4)
|
6
6
|
activesupport (>= 4)
|
7
7
|
coderay (~> 1.1, >= 1.1.2)
|
@@ -98,7 +98,7 @@ GEM
|
|
98
98
|
simplecov-html (~> 0.10.0)
|
99
99
|
simplecov-html (0.10.2)
|
100
100
|
thread_safe (0.3.6)
|
101
|
-
tzinfo (1.2.
|
101
|
+
tzinfo (1.2.6)
|
102
102
|
thread_safe (~> 0.1)
|
103
103
|
unicode-display_width (1.6.0)
|
104
104
|
zeitwerk (2.2.2)
|
@@ -42,8 +42,12 @@ module EditorJs
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def sanitize!
|
45
|
-
%w
|
46
|
-
|
45
|
+
%w[caption embed height service source width].each do |key|
|
46
|
+
str = Sanitize.fragment(data[key], remove_contents: true).strip
|
47
|
+
if %w[embed service source].include?(key)
|
48
|
+
str.gsub('&', '&')
|
49
|
+
end
|
50
|
+
data[key] = str
|
47
51
|
end
|
48
52
|
end
|
49
53
|
|
@@ -44,7 +44,13 @@ module EditorJs
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def sanitize!
|
47
|
-
|
47
|
+
%w[caption url].each do |key|
|
48
|
+
str = Sanitize.fragment(data[key], remove_contents: true).strip
|
49
|
+
if key == 'url'
|
50
|
+
str.gsub('&', '&')
|
51
|
+
end
|
52
|
+
data[key] = str
|
53
|
+
end
|
48
54
|
end
|
49
55
|
|
50
56
|
def plain
|
data/lib/editor_js/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: editor_js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xiaohui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|