convert 0.1.4 → 0.1.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd278fbb7c687e6160133fcb06e36b680d8dfeee
4
- data.tar.gz: 6d3794a6dc74b8690b3b3c90a1eea720e230bdc9
3
+ metadata.gz: 286893621976fa621ce3f805b50cd9415503d37f
4
+ data.tar.gz: e654728de45ba0ec4db9d26d1726eb352792aca9
5
5
  SHA512:
6
- metadata.gz: 76eccb0b8269ddd5e9879f97d237d8e8d4f7644010c0f98982a5cd58eb6f473df5ce09a1620f5683284353f49a940d17e25790bdc2e24729acb359c7d869732d
7
- data.tar.gz: e16ea9f2382e5469364b5a65483b0d569a04434a0b29b3f3c3542e840bffacae4d3fbf41dcc40c68ccbd00e41f0052ae3d659db4015004e12366ae03d522f2ff
6
+ metadata.gz: a1007c444a7249bcc1ac1dc7d3f4cf03c5d80298beccf7e4b6176cf87cb00e8f4f93212d59eb1d9d5ecf4acebc3e7206ccc0e0293671c2f3a950c5e03dcec8cf
7
+ data.tar.gz: c65f03b352274ee6d887021d05a848d507ee0cd636488ce23acaf79e3a9164d2d97d17fe7f8a4869cfabe4d71744a33a7cb98ef512fa7656bb92f1f912da5d7a
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- **Version 0.1.3** - *2016-15-01*
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'
4
- s.date = '2017-01-15'
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"]
@@ -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
@@ -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
@@ -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
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-15 00:00:00.000000000 Z
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
data/mod.rb DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- Dir['./lib/converters/*.rb'].each do |c|
4
-
5
- tmp = ['module Convert']
6
- f = File.readlines(c)
7
- f.each do |line|
8
- tmp << " #{line}"
9
- end
10
- tmp << 'end'
11
-
12
- File.open(c, 'w'){|f| f.write(tmp.join)}
13
- end