onebox 1.7.8 → 1.7.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onebox.rb +3 -0
- data/lib/onebox/preview.rb +1 -4
- data/lib/onebox/{onebox_sanitize_config.rb → sanitize_config.rb} +0 -0
- data/lib/onebox/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05924ebc8cec392430b6205a27c644d58a988121
|
4
|
+
data.tar.gz: 55a81d2164a2b0ba33098ad8a011ee086bfd9397
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23ac9657d7da061cc5fa8c990ad18c34dd8693e4067c64aa4c577d83bed2311508b9c08c7c7183337df69c0e709c80ed5c80d5545fb58558e8970f8083d786d2
|
7
|
+
data.tar.gz: 333e4e9e2346b939ecc8e4bf0cb4a4cb1145e6cdd4832ef42079a341746431f650a412150d27c34a9f6c7b614edb643439f9d41a6053c7754652bcbcd721baf4
|
data/lib/onebox.rb
CHANGED
@@ -9,6 +9,8 @@ require "cgi"
|
|
9
9
|
require "net/http"
|
10
10
|
require "digest"
|
11
11
|
require "fast_blank"
|
12
|
+
require "sanitize"
|
13
|
+
require_relative "onebox/sanitize_config"
|
12
14
|
|
13
15
|
module Onebox
|
14
16
|
DEFAULTS = {
|
@@ -19,6 +21,7 @@ module Onebox
|
|
19
21
|
load_paths: [File.join(Gem::Specification.find_by_name("onebox").gem_dir, "templates")],
|
20
22
|
allowed_ports: [80, 443],
|
21
23
|
allowed_schemes: ["http", "https"],
|
24
|
+
sanitize_config: Sanitize::Config::ONEBOX,
|
22
25
|
}
|
23
26
|
|
24
27
|
@@options = DEFAULTS
|
data/lib/onebox/preview.rb
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
require "sanitize"
|
2
|
-
require_relative "onebox_sanitize_config"
|
3
|
-
|
4
1
|
module Onebox
|
5
2
|
class Preview
|
6
3
|
attr_reader :cache
|
@@ -64,7 +61,7 @@ module Onebox
|
|
64
61
|
end
|
65
62
|
|
66
63
|
def sanitize(html)
|
67
|
-
Sanitize.fragment(html, Sanitize::Config::ONEBOX)
|
64
|
+
Sanitize.fragment(html, @options[:sanitize_config] || Sanitize::Config::ONEBOX)
|
68
65
|
end
|
69
66
|
|
70
67
|
def engine
|
File without changes
|
data/lib/onebox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onebox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joanna Zeta
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-02-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|
@@ -375,8 +375,8 @@ files:
|
|
375
375
|
- lib/onebox/layout.rb
|
376
376
|
- lib/onebox/layout_support.rb
|
377
377
|
- lib/onebox/matcher.rb
|
378
|
-
- lib/onebox/onebox_sanitize_config.rb
|
379
378
|
- lib/onebox/preview.rb
|
379
|
+
- lib/onebox/sanitize_config.rb
|
380
380
|
- lib/onebox/status_check.rb
|
381
381
|
- lib/onebox/template_support.rb
|
382
382
|
- lib/onebox/version.rb
|