fix base_path more thoroughly

This commit is contained in:
AJ ONeal 2015-01-23 04:11:11 -07:00
parent d9d94013de
commit 1494d764c1
1 changed files with 3 additions and 3 deletions

View File

@ -50,9 +50,9 @@
, posts: { collated: view.desi.collated } , posts: { collated: view.desi.collated }
, urls: { , urls: {
base_url: view.env.base_url base_url: view.env.base_url
// /something -> good (leading slash) // /something/ -> good (leading and trailing slash)
// / -> bad (trailing slash) // / -> bad good (leading and trailing slash)
, base_path: view.env.base_path.replace(/^\/$/, '') , base_path: (view.env.base_path + '/').replace('//', '/')
} }
, data: { , data: {
author: { author: {