Explorar o código

Fix path for create new page

WADA Takashi %!s(int64=8) %!d(string=hai) anos
pai
achega
bb0249364d
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      resource/js/legacy/crowi.js

+ 5 - 1
resource/js/legacy/crowi.js

@@ -233,7 +233,11 @@ $(function() {
     if (name.match(/.+\/$/)) {
       name = name.substr(0, name.length - 1);
     }
-    top.location.href = name + '#edit-form';
+    var names = name.split('/');
+    names.forEach(function(item, index) {
+      names[index] = encodeURIComponent(item);
+    });
+    top.location.href = names.join('/') + '#edit-form';
     return false;
   });