From 1494d764c1aeefb0e2b75f7843afaa78b0138269 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 23 Jan 2015 04:11:11 -0700 Subject: [PATCH] fix base_path more thoroughly --- datamapper-ruhoh.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datamapper-ruhoh.js b/datamapper-ruhoh.js index 7fe67d9..b01bbd0 100644 --- a/datamapper-ruhoh.js +++ b/datamapper-ruhoh.js @@ -50,9 +50,9 @@ , posts: { collated: view.desi.collated } , urls: { base_url: view.env.base_url - // /something -> good (leading slash) - // / -> bad (trailing slash) - , base_path: view.env.base_path.replace(/^\/$/, '') + // /something/ -> good (leading and trailing slash) + // / -> bad good (leading and trailing slash) + , base_path: (view.env.base_path + '/').replace('//', '/') } , data: { author: {