The branch selector now sends you to the correct url
[catagits/Gitalist.git] / root / static / js / site.js
index 43340d2..5af7d11 100755 (executable)
@@ -4,7 +4,7 @@ function findPos(obj) {
          do {
                  curleft += obj.offsetLeft;
                  curtop += obj.offsetTop;
-         } 
+         }
          while (obj = obj.offsetParent);
          return [curleft,curtop];
        }
@@ -47,7 +47,7 @@ function uriFor(action, sha1) {
 function switchBranch() {
     var branch = jQuery('#branch-list').val(),
         action = branch != '...' ? 'current' : 'heads';
-    document.location.href = uriFor(action, branch);
+    document.location.href = uriFor(action, encodeURIComponent(branch).replace('/', '%2F'));
 }
 
 function compareDiffs(){