diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index b8972bed6b83f8fd3fa2293248e4e9784d5709f3..8d0f9e06ad7ef1909859424d0eaad820ac832c2d 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -505,12 +505,17 @@ $(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.'));
-				$('#notification').fadeIn();
-				return;
-			}
-			var name = getUniqueName($(this).val());
+            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);
 				var hidden = true;