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
1 changed files with 2 additions and 2 deletions

View File

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