From c86b82bd0c87ed67587d691b68512cdc3a0654e9 Mon Sep 17 00:00:00 2001 From: garrettmills Date: Mon, 19 Oct 2020 09:13:24 -0500 Subject: [PATCH] fix escaping regex in HTML export (#13) --- app/controllers/api/v1/Export.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/Export.controller.js b/app/controllers/api/v1/Export.controller.js index 5f9cea9..945f04b 100644 --- a/app/controllers/api/v1/Export.controller.js +++ b/app/controllers/api/v1/Export.controller.js @@ -78,7 +78,7 @@ class ExportController extends Controller { flat_tree.push({ level, page, - file_name: `${page.Name.replace(/\s/g, '-').replace(/\/\\/g, '-')}-${page.UUID}.html`, + file_name: `${page.Name.replace(/\s/g, '-').replace(/[\/\\]/g, '-')}-${page.UUID}.html`, }) const children = await page.childPages