geminabox 0.13.9 → 0.13.10

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
  SHA1:
3
- metadata.gz: df9f0fb137477b8a862fb6270d1f25bf427905a7
4
- data.tar.gz: a7ad385b84df2a883f3dfdd5d220a8acacc681e2
3
+ metadata.gz: f99339127cb85329830327a63510708d16934887
4
+ data.tar.gz: 3be76ef1c5d1a8bb88646dca5ecd0eebf7a58494
5
5
  SHA512:
6
- metadata.gz: d56bf2095b940b372a7158142c755432cc831c5248802bf2119a093a0d37ce2973271b0bbf1f8758782b67c773716a2d5ae0ca972855269b34a4a7fd43687af8
7
- data.tar.gz: e795e2d39f5235b8ad5422cdca6bacb96027f38cbd2d12a59c6b4dd0e3db70ad51c5b231ae386ca3cd8f68f83cfc9592600faa3fd94922bc588c69f79f2e1a1c
6
+ metadata.gz: a0db612f70e8ce4a700ba9732fa0bf0665ad4d5e823a59baa817914423aae259318669a8ce5497fbfdd7785268d28976dc916e559f0029c06793b219ee058da2
7
+ data.tar.gz: 282ecfb7a179ee09c9e0671c45caf277938faec4c02823eb2ad7f06a5cecc867633468e836b1b730273612e14d92f8c221bb3a91c60a26d572966081e72c23d8
@@ -307,6 +307,15 @@ HTML
307
307
  end
308
308
 
309
309
  helpers do
310
+ def href(text)
311
+ escaped_text = Rack::Utils.escape_html(text)
312
+ if escaped_text.start_with?('http://') || escaped_text.start_with?('https://')
313
+ escaped_text
314
+ else
315
+ '#'
316
+ end
317
+ end
318
+
310
319
  def h(text)
311
320
  Rack::Utils.escape_html(text)
312
321
  end
@@ -1,3 +1,3 @@
1
1
  module Geminabox
2
- VERSION = '0.13.9' unless defined? VERSION
2
+ VERSION = '0.13.10' unless defined? VERSION
3
3
  end
@@ -27,7 +27,7 @@
27
27
  <%= spec.description %>
28
28
  <br/>
29
29
  <span class="author">– <%= spec.authors.map do |author|
30
- "<a href='#{h(spec.homepage)}'>#{author}</a>"
30
+ "<a href='#{href(spec.homepage)}'>#{author}</a>"
31
31
  end.join(', ') %></span>
32
32
  <% end %>
33
33
  </p>
@@ -46,7 +46,7 @@
46
46
  <%= spec.description %>
47
47
  <br/>
48
48
  <span class="author">– <%= spec.authors.map do |author|
49
- "<a href='#{h(spec.homepage)}'>#{author}</a>"
49
+ "<a href='#{href(spec.homepage)}'>#{author}</a>"
50
50
  end.join(', ') %></span>
51
51
  <% end %>
52
52
  </p>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geminabox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.9
4
+ version: 0.13.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lea
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-09-24 00:00:00.000000000 Z
14
+ date: 2017-11-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: sinatra
@@ -147,7 +147,8 @@ files:
147
147
  homepage: http://tomlea.co.uk/p/gem-in-a-box
148
148
  licenses:
149
149
  - MIT-LICENSE
150
- metadata: {}
150
+ metadata:
151
+ source_code_uri: https://github.com/geminabox/geminabox
151
152
  post_install_message:
152
153
  rdoc_options:
153
154
  - "--main"