Yuki Takei 8 лет назад
Родитель
Сommit
df13793bb3
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      lib/models/page.js

+ 6 - 0
lib/models/page.js

@@ -611,6 +611,9 @@ module.exports = function(crowi) {
 
   /**
    * find the page that is match with `path` and its descendants
+   *
+   * 1. `/` will be added to the end of `path`
+   * 2. the regex strings included in `path` will be escaped
    */
   pageSchema.statics.findListWithDescendants = function(path, userData, option) {
     var Page = this;
@@ -672,6 +675,9 @@ module.exports = function(crowi) {
 
   /**
    * generate the query to find the page that is match with `path` and its descendants
+   *
+   * 1. `/` will be added to the end of `path`
+   * 2. the regex strings included in `path` will be escaped
    */
   pageSchema.statics.generateQueryToListWithDescendants = function(path, userData, option) {
     var Page = this;