mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 19:16:37 +00:00
Allow non-ASCII characters in file names of uploaded files (closes #2484)
This commit is contained in:
@@ -205,6 +205,9 @@ function CleanFileName(fileName)
|
||||
// Multiple spaces seem to be a problem, so simply strip them all
|
||||
fileName = fileName.replace(/\s+/g, "");
|
||||
|
||||
// Remove any non-ASCII character
|
||||
fileName = fileName.replace(/[^\x00-\x7F]/g, "");
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user