$(this).append(input);
input.focus();
input.change(function(){
- if(type != 'web' && $(this).val().indexOf('/')!=-1){
- $('#notification').text(t('files','Invalid name, \'/\' is not allowed.'));
- $('#notification').fadeIn();
+ if (type != 'web' && Files.containsInvalidCharacters($(this).val())) {
return;
+ } else if( type == 'folder' && $('#dir').val() == '/' && $(this).val() == 'Shared') {
+ $('#notification').text(t('files','Invalid folder name. Usage of "Shared" is reserved by Owncloud'));
+ $('#notification').fadeIn();
+ return;
}
var name = getUniqueName($(this).val());
if (name != $(this).val()) {