From 598b052be37616b53c7e41c51c01f7150dc9eca8 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Wed, 31 Oct 2012 20:11:23 -0600 Subject: [PATCH] Fix clean Duplicate slashes must be removed everywhere. --- .../frontend/public/gollum/livepreview/js/livepreview.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js b/lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js index 0b798f6d..cc32e706 100644 --- a/lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js +++ b/lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js @@ -108,8 +108,9 @@ $.save = function( commitMessage ) { var msg = defaultCommitMessage(); var newLocation = baseUrl; + // Remove all duplicate slashes function clean( str ) { - return str.replace(/^\/+/, '/'); + return str.replace(/\/+/g, '/'); } // 'a%2Fb' => a/b