2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2025-02-10 23:18:28 +00:00

Remove all non-ascii characters or use default for app name (#217)

This commit is contained in:
Peng Chen 2016-07-12 14:21:42 +08:00 committed by Jia Hao
parent a407b9ea52
commit 48f0872ee5

View File

@ -155,8 +155,8 @@ function optionsFactory(inpOptions, callback) {
function sanitizeFilename(str) { function sanitizeFilename(str) {
const cleaned = sanitizeFilenameLib(str); const cleaned = sanitizeFilenameLib(str);
// remove non ascii // remove all non ascii or use default app name
return cleaned.replace(/[^\x00-\x7F]/, ''); return cleaned.replace(/[^\x00-\x7F]/g, '') || DEFAULT_APP_NAME;
} }
function sanitizeOptions(options) { function sanitizeOptions(options) {