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:
Tom Hennen 2015-09-19 12:26:56 -04:00
commit 7a69147a9e
1 changed files with 1 additions and 1 deletions

View File

@ -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();
} }