mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-17 21:25:54 +02:00
Merge pull request #407 from OpenSignLabs/prafull-opensignlabs-patch-1
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
function sanitizeFileName(fileName) {
|
||||
// Remove spaces and invalid characters
|
||||
return fileName.replace(/[^a-zA-Z0-9._-]/g, "");
|
||||
const file = fileName.replace(/[^a-zA-Z0-9._-]/g, "");
|
||||
const removedot = file.replace(/\.(?=.*\.)/g, "");
|
||||
return removedot.replace(/[^a-zA-Z0-9._-]/g, "");
|
||||
}
|
||||
export default sanitizeFileName;
|
||||
|
||||
Reference in New Issue
Block a user