From a96e1903a303d624eb2879069867a775c289ba7f Mon Sep 17 00:00:00 2001 From: sirius422 Date: Sat, 27 Apr 2024 00:05:10 +0800 Subject: [PATCH] Change the naming rule of regex exporting --- public/scripts/extensions/regex/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/extensions/regex/index.js b/public/scripts/extensions/regex/index.js index 5115af27..98e66fd5 100644 --- a/public/scripts/extensions/regex/index.js +++ b/public/scripts/extensions/regex/index.js @@ -94,7 +94,7 @@ async function loadRegexScripts() { await onRegexEditorOpenClick(scriptHtml.attr('id')); }); scriptHtml.find('.export_regex').on('click', async function () { - const fileName = `${script.scriptName.replace(/[^a-z0-9]/gi, '_').toLowerCase()}.json`; + const fileName = `${script.scriptName.replace(/[\s.<>:"/\\|?*\x00-\x1F\x7F]/g, '_').toLowerCase()}.json`; const fileData = JSON.stringify(script, null, 4); download(fileData, fileName, 'application/json'); });