convert 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/convert.gemspec +2 -2
- data/lib/converters/sanitize.rb +0 -1
- data/lib/sanitizers/custom.rb +7 -3
- data/lib/sanitizers/full.rb +6 -2
- metadata +2 -3
- data/mod.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 286893621976fa621ce3f805b50cd9415503d37f
|
4
|
+
data.tar.gz: e654728de45ba0ec4db9d26d1726eb352792aca9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1007c444a7249bcc1ac1dc7d3f4cf03c5d80298beccf7e4b6176cf87cb00e8f4f93212d59eb1d9d5ecf4acebc3e7206ccc0e0293671c2f3a950c5e03dcec8cf
|
7
|
+
data.tar.gz: c65f03b352274ee6d887021d05a848d507ee0cd636488ce23acaf79e3a9164d2d97d17fe7f8a4869cfabe4d71744a33a7cb98ef512fa7656bb92f1f912da5d7a
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
**Version 0.1.
|
1
|
+
**Version 0.1.5** - *2016-28-01*
|
2
|
+
|
3
|
+
- Added CSS styles to full and custom configs
|
4
|
+
|
5
|
+
**Version 0.1.4** - *2016-15-01*
|
2
6
|
|
3
7
|
- Added simpleidn support with to_ascii and to_unicode
|
4
8
|
- Fixed nil exception when converter list for scan is empty
|
data/convert.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'convert'
|
3
|
-
s.version = '0.1.
|
4
|
-
s.date = '2017-01-
|
3
|
+
s.version = '0.1.5'
|
4
|
+
s.date = '2017-01-28'
|
5
5
|
s.summary = "Convert strings and HTML to links and embedded content"
|
6
6
|
s.description = "Easily convert any string and replace with links and embedded content from a long list of providers and libraries."
|
7
7
|
s.authors = ["Fugroup Limited"]
|
data/lib/converters/sanitize.rb
CHANGED
@@ -6,7 +6,6 @@ module Convert
|
|
6
6
|
def sanitize(string, options = {})
|
7
7
|
return string if options[:config] == false
|
8
8
|
options = {:config => nil}.merge(options)
|
9
|
-
|
10
9
|
config = Object.const_get("Sanitize::Config::#{options[:config].to_s.upcase}") if CONFIGS.include?(options[:config])
|
11
10
|
Sanitize.fragment(string, config || {})
|
12
11
|
end
|
data/lib/sanitizers/custom.rb
CHANGED
@@ -10,7 +10,7 @@ class Sanitize
|
|
10
10
|
],
|
11
11
|
|
12
12
|
:attributes => {
|
13
|
-
:all => ['dir', 'lang', 'title', 'class', 'style', 'id'],
|
13
|
+
:all => ['dir', 'lang', 'title', 'class', 'style', 'id', 'draggable', 'contenteditable'],
|
14
14
|
'a' => ['href', 'target'],
|
15
15
|
'blockquote' => ['cite'],
|
16
16
|
'col' => ['span', 'width'],
|
@@ -28,7 +28,7 @@ class Sanitize
|
|
28
28
|
'th' => ['abbr', 'axis', 'colspan', 'rowspan', 'scope', 'width'],
|
29
29
|
'time' => ['datetime', 'pubdate'],
|
30
30
|
'ul' => ['type'],
|
31
|
-
'iframe' => ['width', 'height', 'src', 'allowFullScreen']
|
31
|
+
'iframe' => ['width', 'height', 'src', 'allowFullScreen', 'allowfullscreen', 'frameborder'],
|
32
32
|
},
|
33
33
|
|
34
34
|
:protocols => {
|
@@ -38,7 +38,11 @@ class Sanitize
|
|
38
38
|
'q' => {'cite' => ['http', 'https', :relative]}
|
39
39
|
},
|
40
40
|
|
41
|
-
:add_attributes => {}
|
41
|
+
:add_attributes => {},
|
42
|
+
|
43
|
+
:css => {
|
44
|
+
:properties => %w[width height]
|
45
|
+
}
|
42
46
|
}
|
43
47
|
|
44
48
|
end
|
data/lib/sanitizers/full.rb
CHANGED
@@ -28,7 +28,7 @@ class Sanitize
|
|
28
28
|
'th' => ['abbr', 'axis', 'colspan', 'rowspan', 'scope', 'width'],
|
29
29
|
'time' => ['datetime', 'pubdate'],
|
30
30
|
'ul' => ['type'],
|
31
|
-
'iframe' => ['width', 'height', 'src', 'allowFullScreen'],
|
31
|
+
'iframe' => ['width', 'height', 'src', 'allowFullScreen', 'allowfullscreen', 'frameborder'],
|
32
32
|
'script' => ['src', 'type']
|
33
33
|
},
|
34
34
|
|
@@ -39,7 +39,11 @@ class Sanitize
|
|
39
39
|
'q' => {'cite' => ['http', 'https', :relative]}
|
40
40
|
},
|
41
41
|
|
42
|
-
:add_attributes => {}
|
42
|
+
:add_attributes => {},
|
43
|
+
|
44
|
+
:css => {
|
45
|
+
:properties => %w[width height]
|
46
|
+
}
|
43
47
|
}
|
44
48
|
|
45
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: convert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fugroup Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redcarpet
|
@@ -176,7 +176,6 @@ files:
|
|
176
176
|
- lib/sanitizers/full.rb
|
177
177
|
- lib/sanitizers/linebreaks.rb
|
178
178
|
- lib/sanitizers/simple.rb
|
179
|
-
- mod.rb
|
180
179
|
homepage: https://github.com/fugroup/convert
|
181
180
|
licenses:
|
182
181
|
- MIT
|