Also reject names with \ in the name

fixes issues #435 and #437
remotes/origin/stable45
Bart Visscher 14 years ago committed by Thomas Mueller
parent 470e93e4df
commit 05db74e7db
  1. 4
      apps/files/js/files.js

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

Loading…
Cancel
Save