gollum 2.4.5 → 2.4.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gollum might be problematic. Click here for more details.

@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
5
5
  s.required_ruby_version = ">= 1.8.7"
6
6
 
7
7
  s.name = 'gollum'
8
- s.version = '2.4.5'
9
- s.date = '2012-12-10'
8
+ s.version = '2.4.6'
9
+ s.date = '2012-12-18'
10
10
  s.rubyforge_project = 'gollum'
11
11
 
12
12
  s.summary = "A simple, Git-powered wiki."
@@ -25,10 +25,10 @@ require File.expand_path('../gollum/frontend/uri_encode_component', __FILE__)
25
25
 
26
26
  # Set ruby to UTF-8 mode
27
27
  # This is required for Ruby 1.8.7 which gollum still supports.
28
- $KCODE = 'U' if RUBY_VERSION[2,1] == '8'
28
+ $KCODE = 'U' if RUBY_VERSION[0,3] == '1.8'
29
29
 
30
30
  module Gollum
31
- VERSION = '2.4.5'
31
+ VERSION = '2.4.6'
32
32
 
33
33
  def self.assets_path
34
34
  ::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
@@ -699,14 +699,14 @@ ul.actions {
699
699
 
700
700
  #pages li a.file,
701
701
  #pages li a.folder {
702
- background-image: url(/images/fileview/document.png);
702
+ background-image: url(../images/fileview/document.png);
703
703
  background-position: 0 1px;
704
704
  background-repeat: no-repeat;
705
705
  padding-left: 20px;
706
706
  }
707
707
 
708
708
  #pages li a.folder {
709
- background-image: url(/images/fileview/folder-horizontal.png);
709
+ background-image: url(../images/fileview/folder-horizontal.png);
710
710
  }
711
711
 
712
712
  #pages .breadcrumb {
@@ -475,7 +475,7 @@ module Gollum
475
475
  #
476
476
  # Returns the placeholder'd String data.
477
477
  def extract_code(data)
478
- data.gsub!(/^([ \t]*)(~~~+) ?([^\r\n]+)?\r?\n(.+?)\r?\n\1(~~~+)\r?$/m) do
478
+ data.gsub!(/^([ \t]*)(~~~+) ?([^\r\n]+)?\r?\n(.+?)\r?\n\1(~~~+)[ \t\r]*$/m) do
479
479
  m_indent = $1
480
480
  m_start = $2 # ~~~
481
481
  m_lang = $3
@@ -504,7 +504,7 @@ module Gollum
504
504
  "#{m_indent}#{id}" # print the SHA1 ID with the proper indentation
505
505
  end
506
506
 
507
- data.gsub!(/^([ \t]*)``` ?([^\r\n]+)?\r?\n(.+?)\r?\n\1```\r?$/m) do
507
+ data.gsub!(/^([ \t]*)``` ?([^\r\n]+)?\r?\n(.+?)\r?\n\1```[ \t]*\r?$/m) do
508
508
  lang = $2 ? $2.strip : nil
509
509
  id = Digest::SHA1.hexdigest("#{lang}.#{$3}")
510
510
  cached = check_cache(:code, id)
@@ -45,7 +45,8 @@ module Gollum
45
45
  # Default whitelisted protocols for URLs.
46
46
  PROTOCOLS = {
47
47
  'a' => {'href' => ['http', 'https', 'mailto', 'ftp', 'irc', 'apt', :relative]},
48
- 'img' => {'src' => ['http', 'https', :relative]}
48
+ 'img' => {'src' => ['http', 'https', :relative]},
49
+ 'form' => {'action' => ['http', 'https', :relative]}
49
50
  }.freeze
50
51
 
51
52
  ADD_ATTRIBUTES = lambda do |env, node|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gollum
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.5
4
+ version: 2.4.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-12-10 00:00:00.000000000 Z
13
+ date: 2012-12-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: grit