some more invalid characters have been added

This commit is contained in:
Thomas Mueller 2012-11-22 11:22:16 +01:00 committed by Jörn Friedrich Dreyer
parent 1793e85a52
commit cd495bf9ba
1 changed files with 11 additions and 6 deletions

View File

@ -505,12 +505,17 @@ $(document).ready(function() {
$(this).append(input);
input.focus();
input.change(function(){
if(type != 'web' && ($(this).val().indexOf('/')!=-1 || $(this).val().indexOf('\\')!=-1)) {
$('#notification').text(t('files', 'Invalid name, \'/\' or \'\\\' is not allowed.'));
$('#notification').fadeIn();
return;
}
var name = getUniqueName($(this).val());
if (type != 'web') {
var invalid_characters = ['\\', '/', '<', '>', ':', '"', '|', '?', '*'];
for (var i = 0; i < invalid_characters.length; i++) {
if ($(this).val().indexOf(invalid_characters[i]) != -1) {
$('#notification').text(t('files', "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed."));
$('#notification').fadeIn();
return;
}
}
}
var name = getUniqueName($(this).val());
if (name != $(this).val()) {
FileList.checkName(name, $(this).val(), true);
var hidden = true;