jekyll-embed-urls 0.5.12 → 0.5.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll/embed.rb +4 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2a73f6c1244a844aca4001906bb6f246f7561c6c322f4305a0cdf58b714a54d
4
- data.tar.gz: 9a5644e4762cdb878f061ff96e0974cfdf76eceb40d73d010599154c5b19a527
3
+ metadata.gz: b37dd0e2524605ba192b934e51c69e045cd87f6b98fa77abcc6cb334eccfa9de
4
+ data.tar.gz: a279872e004fbd1f211ab1702b1552e3c0b565984f56f20deceb3ca992cb09df
5
5
  SHA512:
6
- metadata.gz: ffae3ac265602187cbe8162c42a6c230939aaa51b9ffdf5d78f95cf7825ab1c2a97186dfdd4b1a39312060de81a82a1a632decf9dca5e946fbc255467c175221
7
- data.tar.gz: 49d90cd9b14a7d0e526c99ab6e42083e52295a5a4b385eb990dd873d9f8269f093ce877f47e75e9662d060a29ede68fff7cbef67b8ba86a47f7315fbd749d178
6
+ metadata.gz: e68304563ce6182e6620fce8513298dc7a5a6878cf069122e002299ee825014d9074a928be4109008a10a2499bb5b7164816b0919c959ec529f2dbddb3023369
7
+ data.tar.gz: d8e19c14418c85cd53aa77889aaa6e1acdd0e547d4fdb5943698386d2771f7126134daa94f7a3edc13a972680bab795f55df0c4034885f5f18be168ac3a38d94
data/lib/jekyll/embed.rb CHANGED
@@ -153,7 +153,9 @@ module Jekyll
153
153
  # @param [String] URL
154
154
  # @return [String] HTML
155
155
  def embed(url)
156
- url.strip!
156
+ raise URI::Error unless url.is_a? String
157
+
158
+ url = url.strip
157
159
 
158
160
  # Quick check
159
161
  raise URI::Error unless url.start_with? 'http'
@@ -212,7 +214,7 @@ module Jekyll
212
214
 
213
215
  %w[image video audio].each do |attr|
214
216
  page[attr] = ogp.public_send(:"#{attr}s").find do |a|
215
- http? a.url
217
+ a && a.url && http?(a.url)
216
218
  end&.url
217
219
  end
218
220
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-embed-urls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.12
4
+ version: 0.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-13 00:00:00.000000000 Z
11
+ date: 2023-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll