Merge pull request #1211 from mfietz/issue/1203-disallowed-filename
Allow only alphanumeric and a few other characters in media filenames
This commit is contained in:
commit
7a69147a9e
|
@ -351,7 +351,7 @@ public class DownloadRequester {
|
||||||
if (media.getItem() != null && media.getItem().getTitle() != null) {
|
if (media.getItem() != null && media.getItem().getTitle() != null) {
|
||||||
String title = media.getItem().getTitle();
|
String title = media.getItem().getTitle();
|
||||||
// Delete reserved characters
|
// Delete reserved characters
|
||||||
titleBaseFilename = title.replaceAll("[\\\\/%\\?\\*:|<>\"\\p{Cntrl}]", "");
|
titleBaseFilename = title.replaceAll("[^a-zA-Z0-9 ._()-]", "");
|
||||||
titleBaseFilename = titleBaseFilename.trim();
|
titleBaseFilename = titleBaseFilename.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue