2
0
Эх сурвалжийг харах

Fix path for create new page

WADA Takashi 8 жил өмнө
parent
commit
bb0249364d

+ 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;
   });