tdiary-contrib 5.1.1 → 5.1.2

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: 6d05b8aee451bdb2d46f614f71ecf05c5a1fbea55cc10128f33afbaa78ee891a
4
- data.tar.gz: c38b151fd3e0bda3b739b5559edad2314ec9babae98aed542e4ad6a3c47ec2fb
3
+ metadata.gz: 077a15f87d9312e2fd05c48aecdb4ea89bfeb7ef8e73b197eea443a0b628f75e
4
+ data.tar.gz: c488339e3f3dd2d99ea88d06e0f2fe35cebc7aa24dd3b66e5557e43535c3a392
5
5
  SHA512:
6
- metadata.gz: 86cc1a3bd5df50b9f013c337674728462953142d1c0edac978f59a41e42d2b721a725f3b62bd27baab1b7bf8b00d54c14210d99e50518023746538cf29de51ce
7
- data.tar.gz: a81df14d1727012e4c306d1d8c1c4f4ce5878a70f3f6f9bac14f8d9ec988a2c24d19a4c50de395be8a8b0d8edeb17861988b23a7b09828a768a3397000654e5a
6
+ metadata.gz: 6e438aaf3632d87cc666fd3d7f54b56e7962959501652f825cdf027b043e1c64540d5c0b382a92e88bdc8fb16d0f5146262664afc94a78650028b9173071bd6f
7
+ data.tar.gz: 3a31c1283e905e1880fe15f991ffc50c65eedf22a4471dad95b2b68a9af47f5fc2e75162617f5a2195fb0de9c9e328dfb6af276f3e83beda5484a4af2b318875
@@ -1,5 +1,5 @@
1
1
  module TDiary
2
2
  class Contrib
3
- VERSION = "5.1.1"
3
+ VERSION = "5.1.2"
4
4
  end
5
5
  end
@@ -20,7 +20,7 @@ add_subtitle_proc do |date, index, subtitle|
20
20
  section_url = @conf.base_url + anchor(date.strftime('%Y%m%d')) + '#p' + ('%02d' % index)
21
21
 
22
22
  if @conf['add.bookmark.delicious'] == 't' then
23
- escaped_url = CGI.escape(section_url, /[^-.!~*'()\w]/n)
23
+ escaped_url = CGI.escape(section_url)
24
24
  caption += %Q|<a href="http://delicious.com/save?url=#{escaped_url}" onclick="window.open('http://delicious.com/save?v=5;noui;jump=close;url=#{escaped_url};title='+encodeURIComponent(document.title), 'delicious', 'toolbar=no,width=550,height=550'); return false">|
25
25
  caption += %Q|<img src="http://static.delicious.com/img/delicious.small.gif" width="10" height="10" style="border: 0 none;vertical-align: middle;" alt="#{@caption_delicious}">|
26
26
  caption += %Q|</a> |
@@ -53,7 +53,7 @@ def notify_miniblog
53
53
 
54
54
  # strip category
55
55
  sectitle.gsub!(/\[[^\]]+\] */, '')
56
- url = CGI.escape(@conf.base_url + anchor("#{date}p%02d" % index), /[^-.!~*'()\w]/n)
56
+ url = CGI.escape(@conf.base_url + anchor("#{date}p%02d" % index))
57
57
  prefix = @conf['miniblog.notify.prefix']
58
58
  format = @conf['miniblog.notify.format']
59
59
  source = 'tdiary/notify_miniblog.rb'
@@ -29,7 +29,6 @@ end
29
29
 
30
30
  def twitter_statuses_show_api( tweet_id )
31
31
  url = "https://api.twitter.com/1.1/statuses/show.json"
32
- unsafe = /[^a-zA-Z0-9\-\.\_\~]/
33
32
  parameters = {
34
33
  :id => tweet_id
35
34
  }
@@ -41,8 +40,8 @@ def twitter_statuses_show_api( tweet_id )
41
40
  :oauth_token => @conf["twitter_quote.oauth_token"],
42
41
  :oauth_version => "1.0"
43
42
  }
44
- data = "GET&#{CGI.escape( url, unsafe )}&"
45
- data << CGI.escape( oauth_parameters.merge( parameters ).sort.map{|k, v| "#{k}=#{v}" }.join( "&" ), unsafe )
43
+ data = "GET&#{CGI.escape( url )}&"
44
+ data << CGI.escape( oauth_parameters.merge( parameters ).sort.map{|k, v| "#{k}=#{v}" }.join( "&" ) )
46
45
  oauth_parameters[:oauth_signature] = [OpenSSL::HMAC.digest(
47
46
  OpenSSL::Digest::SHA1.new,
48
47
  CGI.escape( "#{@conf["twitter_quote.oauth_consumer_secret"]}&#{@conf["twitter_quote.oauth_token_secret"]}" ),
@@ -53,7 +52,7 @@ def twitter_statuses_show_api( tweet_id )
53
52
  proxy = 'http://' + proxy if proxy
54
53
 
55
54
  headers = {
56
- "Authorization" => %Q[OAuth #{oauth_parameters.map{|k ,v| "#{CGI.escape( k.to_s, unsafe )}=\"#{CGI.escape( v, unsafe )}\""}.join( "," )}],
55
+ "Authorization" => %Q[OAuth #{oauth_parameters.map{|k ,v| "#{CGI.escape( k.to_s )}=\"#{CGI.escape( v )}\""}.join( "," )}],
57
56
  :proxy => proxy
58
57
  }
59
58
  Timeout.timeout( 20 ) do
@@ -844,7 +844,7 @@ class Hatena::Google
844
844
  end
845
845
 
846
846
  def convert(mode)
847
- uri = 'http://www.google.com/search?q=%s&amp;ie=euc-jp&amp;oe=euc-jp' % CGI.escape(@str, /[^-_.!~*'()a-zA-Z0-9]/)
847
+ uri = 'http://www.google.com/search?q=%s&amp;ie=euc-jp&amp;oe=euc-jp' % CGI.escape(@str)
848
848
  return uri unless @tag_p
849
849
  template=nil
850
850
  if mode == :CHTML
@@ -889,7 +889,7 @@ class Hatena::Keyword
889
889
  end
890
890
 
891
891
  def convert(mode)
892
- uri = '%skeyword/%s' % [@group, CGI.escape(@str, /[^-_.!~*'()a-zA-Z0-9]/)]
892
+ uri = '%skeyword/%s' % [@group, CGI.escape(@str)]
893
893
  return uri unless @tag_p
894
894
  template=nil
895
895
  if mode == :CHTML
@@ -958,7 +958,7 @@ class Hatena::AmazonSearch
958
958
  end
959
959
 
960
960
  def convert(mode)
961
- uri = 'http://www.amazon.co.jp/exec/obidos/external-search?mode=blended&amp;tag=%s&amp;encoding-string-jp=%%c6%%fc%%cb%%dc%%b8%%ec&amp;keyword=%s' % [Hatena.conf['amazon.aid'] || '', CGI.escape(@str, /[^-_.!~*'()a-zA-Z0-9]/)]
961
+ uri = 'http://www.amazon.co.jp/exec/obidos/external-search?mode=blended&amp;tag=%s&amp;encoding-string-jp=%%c6%%fc%%cb%%dc%%b8%%ec&amp;keyword=%s' % [Hatena.conf['amazon.aid'] || '', CGI.escape(@str)]
962
962
  return uri unless @tag_p
963
963
  template=nil
964
964
  if mode == :CHTML
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdiary-contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.1
4
+ version: 5.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - tDiary contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-29 00:00:00.000000000 Z
11
+ date: 2020-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tdiary