Also reject names with \ in the name

fixes issues #435 and #437
remotes/origin/stable5
Bart Visscher 13 years ago committed by Jörn Friedrich Dreyer
parent 568def2b61
commit 1793e85a52
  1. 4
      apps/files/js/files.js

@ -505,8 +505,8 @@ $(document).ready(function() {
$(this).append(input); $(this).append(input);
input.focus(); input.focus();
input.change(function(){ input.change(function(){
if(type != 'web' && $(this).val().indexOf('/')!=-1){ if(type != 'web' && ($(this).val().indexOf('/')!=-1 || $(this).val().indexOf('\\')!=-1)) {
$('#notification').text(t('files','Invalid name, \'/\' is not allowed.')); $('#notification').text(t('files', 'Invalid name, \'/\' or \'\\\' is not allowed.'));
$('#notification').fadeIn(); $('#notification').fadeIn();
return; return;
} }

Loading…
Cancel
Save