arvid-e 2 месяцев назад
Родитель
Сommit
c9fa34700d
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/remark-lsx/src/server/routes/list-pages/index.ts

+ 1 - 1
packages/remark-lsx/src/server/routes/list-pages/index.ts

@@ -95,7 +95,7 @@ export const listPages = ({ excludedPaths }: { excludedPaths: string[] }) => {
       if (excludedPaths.length > 0) {
         const escapedPaths = excludedPaths.map((p) => {
           const cleanPath = p.startsWith('/') ? p.substring(1) : p;
-          return cleanPath.replace(/\//g, '\\/');
+          return cleanPath.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
         });
 
         const regex = new RegExp(`^\\/(${escapedPaths.join('|')})(\\/|$)`);