anchor.diff:        }
       return result.replace(/\/{2}/g, '/')
     }
  +}
  +
  +// Ensure one slash at the beginning, no trailing slash.
  +function cleanPath (path){
  +  var result = '/' + path.replace(/\/$/,'');
  +  return result.replace(/\/{2}/g, '/');
   }
   
   function pageName(){
  
positive.code:       var oldName = pageName();
        var context_blurb =
          "Renamed page will be under " +
          "<span class='path'>" + htmlEscape('/' + path) + "</span>" +
          " unless an absolute path is given."
  
        $.GollumDialog.init({
  
negative.code:       $(this).attr('disabled', true);
  
        var formData = new FormData($('#gollum-editor-form').get(0));
        var newPath  = cleanPath(prefixBaseUrl(pagePath() + '/' + pageName() + formatToExt($('#wiki_format')[0].value)));
        var endpoint = $('#gollum-editor-form').attr("action");
  
        $.ajax({
  