You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Clipper: Fixes #1600: Handle SVG images and fix issue with invalid file extensions
This commit is contained in:
@ -37,9 +37,10 @@ function isHidden(path) {
|
||||
return b[0] === '.';
|
||||
}
|
||||
|
||||
function safeFileExtension(e) {
|
||||
function safeFileExtension(e, maxLength = null) {
|
||||
if (maxLength === null) maxLength = 8;
|
||||
if (!e || !e.replace) return '';
|
||||
return e.replace(/[^a-zA-Z0-9]/g, '')
|
||||
return e.replace(/[^a-zA-Z0-9]/g, '').substr(0, maxLength);
|
||||
}
|
||||
|
||||
function safeFilename(e, maxLength = null, allowSpaces = false) {
|
||||
|
Reference in New Issue
Block a user