Also reject names with \ in the name

fixes issues #435 and #437
This commit is contained in:
Bart Visscher 2012-11-16 12:16:23 +01:00 committed by Jörn Friedrich Dreyer
parent 568def2b61
commit 1793e85a52
1 changed files with 2 additions and 2 deletions

View File

@ -505,8 +505,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;
}