onebox 1.6.3 → 1.6.4

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: 6c058240b30efa1a0c9228acb70ab03469bbcda8
4
- data.tar.gz: 2c3ac99c67db56e5da345cb5dd5e836ba432db9b
3
+ metadata.gz: f66b9e99739c4d99ed0de7f781c2103857372d39
4
+ data.tar.gz: 44909b6ed468b9da999d79ab23f7edd0cdf49108
5
5
  SHA512:
6
- metadata.gz: fcf90694c1049cf40c59cb4aac01b9aec75629ccd20fc92d30bab5a6035c831230f9fa43c2676fa6bd9adfc07d2d1901066d8ed5b1f825224fd06bea96b1c6e9
7
- data.tar.gz: 22cf1597307e68d2bd242b712f23da3f2f851279c821074da8c5a2be4611559bb84a42467fecf08fba2897a6cbcb94e7321f1b6c028cd1256f1823d3ba4a27d5
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
- "<a href='#{@url}' target='_blank'><img src='#{@url}'></a>"
18
+ escaped = url.gsub(/'/, "%27")
19
+ "<a href='#{escaped}' target='_blank'><img src='#{escaped}'></a>"
19
20
  end
20
21
  end
21
22
  end
@@ -1,3 +1,3 @@
1
1
  module Onebox
2
- VERSION = "1.6.3"
2
+ VERSION = "1.6.4"
3
3
  end
@@ -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.3
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 00:00:00.000000000 Z
13
+ date: 2016-12-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json