Fix clean

Duplicate slashes must be removed everywhere.
This commit is contained in:
bootstraponline
2012-10-31 20:11:23 -06:00
parent a746062422
commit 598b052be3
@@ -108,8 +108,9 @@ $.save = function( commitMessage ) {
var msg = defaultCommitMessage(); var msg = defaultCommitMessage();
var newLocation = baseUrl; var newLocation = baseUrl;
// Remove all duplicate slashes
function clean( str ) { function clean( str ) {
return str.replace(/^\/+/, '/'); return str.replace(/\/+/g, '/');
} }
// 'a%2Fb' => a/b // 'a%2Fb' => a/b