فهرست منبع

escape page path

Yuki Takei 1 سال پیش
والد
کامیت
5e9dd86900
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      packages/core/src/utils/page-path-utils/index.ts

+ 1 - 1
packages/core/src/utils/page-path-utils/index.ts

@@ -286,7 +286,7 @@ export const generateChildrenRegExp = (path: string): RegExp => {
 
 
   // https://regex101.com/r/mrDJrx/1
   // https://regex101.com/r/mrDJrx/1
   // ex. /parent/any_child OR /any_level1
   // ex. /parent/any_child OR /any_level1
-  return new RegExp(`^${path}(\\/[^/]+)\\/?$`);
+  return new RegExp(`^${escapeStringRegexp(path)}(\\/[^/]+)\\/?$`);
 };
 };
 
 
 /**
 /**