Explorar el Código

fix isCreatableName for template

Yuki Takei hace 8 años
padre
commit
8b71a13be8
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      lib/models/page.js

+ 2 - 3
lib/models/page.js

@@ -392,9 +392,8 @@ module.exports = function(crowi) {
 
   pageSchema.statics.isCreatableName = function(name) {
     var forbiddenPages = [
-      /\^|\$|\*|\+|\#/,
-      /^\/_.*/, // /_api/* and so on
-      /^\/\-\/.*/,
+      /\^|\$|\*|\+|#/,
+      /^\/-\/.*/,
       /^\/_r\/.*/,
       /^\/?https?:\/\/.+$/, // avoid miss in renaming
       /\/{2,}/,             // avoid miss in renaming