We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7b9f3f commit a4a0630Copy full SHA for a4a0630
apps/OpenSign/src/primitives/sanitizeFileName.js
@@ -1,5 +1,7 @@
1
function sanitizeFileName(fileName) {
2
// Remove spaces and invalid characters
3
- return fileName.replace(/[^a-zA-Z0-9._-]/g, "");
+ const file = fileName.replace(/[^a-zA-Z0-9._-]/g, "");
4
+ const removedot = file.replace(/\.(?=.*\.)/g, "");
5
+ return removedot.replace(/[^a-zA-Z0-9._-]/g, "");
6
}
7
export default sanitizeFileName;
0 commit comments