Prevent special characters from breaking the file drop remote url
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
0a59b4ec6b
commit
b1c1ac1459
|
@ -35,7 +35,11 @@
|
||||||
useHTTPS: OC.getProtocol() === 'https'
|
useHTTPS: OC.getProtocol() === 'https'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// We only process one file at a time 🤷♀️
|
||||||
var name = data.files[0].name;
|
var name = data.files[0].name;
|
||||||
|
// removing unwanted characters
|
||||||
|
name = name.replace(/["'#%`]/gm, '');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// FIXME: not so elegant... need to refactor that method to return a value
|
// FIXME: not so elegant... need to refactor that method to return a value
|
||||||
Files.isFileNameValid(name);
|
Files.isFileNameValid(name);
|
||||||
|
|
Loading…
Reference in New Issue