This commit is contained in:
bootstraponline
2012-10-13 13:04:51 -06:00
parent 432f9b8d2f
commit 5401cf2910
3 changed files with 10 additions and 3 deletions
+7
View File
@@ -23,5 +23,12 @@ module Precious
return url if url.nil?
url.gsub('%2F','/').gsub(/^\/+/,'')
end
def trim_leading_slash url
return url if url.nil?
url.gsub!('%2F','/')
return '/' + url.gsub(/^\/+/,'') if url[0,1] == '/'
url
end
end
end
+1 -1
View File
@@ -411,7 +411,7 @@ module Gollum
# //page is invalid
# strip all duplicate forward slashes using helpers.rb clean_url
# //page => /page
# link = one_leading_slash link
link = trim_leading_slash link
%{<a class="internal #{presence}" href="#{link}#{extra}">#{name}</a>}
end