onebox 1.6.6 → 1.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onebox/helpers.rb +2 -1
- data/lib/onebox/version.rb +1 -1
- data/spec/lib/onebox/engine/image_onebox_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22237e827c83b06b67a2135ae66f75690da5f87b
|
4
|
+
data.tar.gz: 0697141bd0aa6f4197cd68de1fcb74c8c4407fb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1b2de7ce31a701e60a1ab238d406484a16a3660039530ac21054e8561a4bc1dcdb313ee37b66fb580c8709b4e058806c70b3a84e00f01dcc8a88a4c253ee94c
|
7
|
+
data.tar.gz: b3622e546b4c1e68578416c66ff7105e0ed4496aee3258837a70f61c34ea275a9f4b9a8af8ae0eb03ab9740260f67a885f1b8df9aeb96f66e5f0267a78501cc4
|
data/lib/onebox/helpers.rb
CHANGED
@@ -75,8 +75,9 @@ module Onebox
|
|
75
75
|
def self.normalize_url_for_output(url)
|
76
76
|
url = url.dup
|
77
77
|
# expect properly encoded url, remove any unsafe chars
|
78
|
+
url.gsub!("'", "'")
|
79
|
+
url.gsub!('"', """)
|
78
80
|
url.gsub!(/[^a-zA-Z0-9%\-`._~:\/?#\[\]@!$&'\(\)*+,;=]/, "")
|
79
|
-
url.gsub!("'", """)
|
80
81
|
url
|
81
82
|
end
|
82
83
|
|
data/lib/onebox/version.rb
CHANGED
@@ -38,6 +38,6 @@ describe Onebox::Engine::ImageOnebox do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
it "doesn't inline single quotes" do
|
41
|
-
expect(Onebox.preview("http://host/path/to/Image'withquote.png").to_s).to match(/Image&
|
41
|
+
expect(Onebox.preview("http://host/path/to/Image'withquote.png").to_s).to match(/Image'withquote/)
|
42
42
|
end
|
43
43
|
end
|