always ADD a leading slash to page.url or post.url

This commit is contained in:
maul.esel 2013-04-20 13:15:40 +02:00
parent c6df2e150a
commit d73841c961
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ module Jekyll
# sanitize url
@url = url.split('/').reject{ |part| part =~ /^\.+$/ }.join('/')
@url += "/" if url =~ /\/$/
@url.gsub!(/\A\//, '')
@url.gsub!(/\A([^\/])/, '/\1')
@url
end

View File

@ -194,7 +194,7 @@ module Jekyll
# sanitize url
@url = url.split('/').reject{ |part| part =~ /^\.+$/ }.join('/')
@url += "/" if url =~ /\/$/
@url.gsub!(/\A\//, '')
@url.gsub!(/\A([^\/])/, '/\1')
@url
end