Permalink
Browse files

Merge pull request #2 from pigletto/master

More fixes
  • Loading branch information...
2 parents b22ba78 + 974ca31 commit 49ebe48aa6f65c13c410c64b6b46faecb673b2ea @piotreq committed Mar 26, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −1 lib/gollum/frontend/public/javascript/gollum.js
  2. +3 −2 lib/gollum/markup.rb
@@ -114,7 +114,7 @@ $(document).ready(function() {
var n = 'New Page';
if ( res['name'] )
var n = res['name'];
- n = encodeURIComponent( n );
+ n = encodeURI( n );
window.location = BASE_PATH + '/' + n;
}
});
View
@@ -1,5 +1,6 @@
require 'digest/sha1'
require 'cgi'
+require 'uri'
require 'pygments'
require 'base64'
@@ -306,10 +307,10 @@ def process_page_link_tag(tag)
link_name = cname
page, extra = find_page_from_name(cname)
if page
- link_name = @wiki.page_class.cname(page.name)
+ link_name = page.url #@wiki.page_class.cname(page.name)
presence = "present"
end
- link = ::File.join(@wiki.base_path, CGI.escape(link_name))
+ link = ::File.join(@wiki.base_path, URI.escape(link_name))
%{<a class="internal #{presence}" href="#{link}#{extra}">#{name}</a>}
end
end

0 comments on commit 49ebe48

Please sign in to comment.