onebox 1.6.3 → 1.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onebox/engine/image_onebox.rb +2 -1
- data/lib/onebox/version.rb +1 -1
- data/spec/lib/onebox/engine/image_onebox_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f66b9e99739c4d99ed0de7f781c2103857372d39
|
4
|
+
data.tar.gz: 44909b6ed468b9da999d79ab23f7edd0cdf49108
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9f604421b36115f034264bd092366e3f640087c750d38d8293e1f3db4343e74c236a60eba98b33eb5c1f06d0d5277f188515cd37c54c5b5bb7e94422c44e69e
|
7
|
+
data.tar.gz: 48b59ff62e5417e353a5a5ff7daaf002475243b2e8bf71d45ee00639e271a85de6e1bf22dda104ac6a2a6c34e1f953dd3428ca17fe63d11035cb0ad3b773c7d1
|
@@ -15,7 +15,8 @@ module Onebox
|
|
15
15
|
@url.gsub!("https://www.dropbox.com","https://dl.dropboxusercontent.com")
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
escaped = url.gsub(/'/, "%27")
|
19
|
+
"<a href='#{escaped}' target='_blank'><img src='#{escaped}'></a>"
|
19
20
|
end
|
20
21
|
end
|
21
22
|
end
|
data/lib/onebox/version.rb
CHANGED
@@ -36,4 +36,8 @@ describe Onebox::Engine::ImageOnebox do
|
|
36
36
|
it "includes a direct link to the image" do
|
37
37
|
expect(Onebox.preview('http://www.discourse.org/images/logo.png').to_s).to match(/<a.*png/)
|
38
38
|
end
|
39
|
+
|
40
|
+
it "doesn't inline single quotes" do
|
41
|
+
expect(Onebox.preview("http://host/path/to/image'withquote.png").to_s).to match(/image%27withquote/)
|
42
|
+
end
|
39
43
|
end
|
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.6.
|
4
|
+
version: 1.6.4
|
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: 2016-12-
|
13
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|