some more invalid characters have been added

remotes/origin/stable5
Thomas Mueller 12 years ago committed by Jörn Friedrich Dreyer
parent 1793e85a52
commit cd495bf9ba
  1. 9
      apps/files/js/files.js

@ -505,11 +505,16 @@ $(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.'));
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);

Loading…
Cancel
Save