onebox 1.8.50 → 1.8.51

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e62d2b22c537e8c97becadbcc8f4c5d4b0ea5b31b1b096cfb4904ee39ff583c
4
- data.tar.gz: 8794956832c051ea3da3422490884d51b0dc244f12a4459447fd476573718fe1
3
+ metadata.gz: 283222edef53d205642ef9d1f61211a762432e573be45cf665d7d19130594b52
4
+ data.tar.gz: 8dc1d9df191891115f6da86611a9053c3dc43137f371961b1f65fba7156e4ae4
5
5
  SHA512:
6
- metadata.gz: 5cc79d2f6e1960dd1c24d203fa0a55227fd8e0f62a077084dc7efe4304a723f518cfd9a3b7a0a0976615f5a06cb2653495b5a0e4934db85d151411c6c4e4b4e4
7
- data.tar.gz: 3155f199ad086c65413602dee4a11d94899e56d59e357db82edaac0ed3a50a53d113b12aaa7f60fb00ae56f6bd70c4b243228160bb7b604bee7e110cab545822
6
+ metadata.gz: f95061b58fb74a8cfdc49f34f1a8634bac6cbdfa10fd64e49390bc5da48c09028c3c28fa1320e386ff481c32e1bb4779f7ca4f818e812be2e197f194ace86061
7
+ data.tar.gz: 75cfe9bb75b90c65057154b2069143e0f09d7f4c381baab1c3509c172730e44bccccba4515e414332f10691a2e72491cbb82fba01071a1aed4cf094956386cdb
@@ -50,7 +50,7 @@ module Onebox
50
50
 
51
51
  def video_title
52
52
  @video_title ||= begin
53
- video_oembed_data[:title]
53
+ Sanitize.fragment(Onebox::Helpers.truncate(video_oembed_data[:title].strip, 80))
54
54
  rescue
55
55
  nil
56
56
  end
@@ -173,7 +173,8 @@ module Onebox
173
173
  end
174
174
 
175
175
  def self.title_attr(meta)
176
- (meta && !blank?(meta[:title])) ? "title='#{meta[:title]}'" : ""
176
+ title = meta[:title].gsub("'", "'").gsub('"', """)
177
+ (meta && !blank?(title)) ? "title='#{title}'" : ""
177
178
  end
178
179
 
179
180
  def self.normalize_url_for_output(url)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "1.8.50"
4
+ VERSION = "1.8.51"
5
5
  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.8.50
4
+ version: 1.8.51
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: 2018-06-20 00:00:00.000000000 Z
13
+ date: 2018-06-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json