diff --git a/core/oputil/oputil_config.js b/core/oputil/oputil_config.js index 2e8b0add..dd6fc783 100644 --- a/core/oputil/oputil_config.js +++ b/core/oputil/oputil_config.js @@ -257,7 +257,7 @@ function buildNewConfig() { return; } - const bn = sanatizeFilename(config.general.boardName).replace(/ /g, '_').toLowerCase(); + const bn = sanatizeFilename(config.general.boardName).replace(/[^a-z0-9_\-]/ig, '_').toLowerCase(); const menuFile = `${bn}.hjson`; copyFileSyncSilent( paths.join(__dirname, '../../config/menu.hjson'),