diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 0e842cc7a7495af2edc0fab5a78fbb9938a40e1c..98d0f132ad69d58bf2aa658588e93aa2f336d125 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1941,7 +1941,9 @@
 					// Files.isFileNameValid(filename) throws an exception itself
 					OCA.Files.Files.isFileNameValid(filename);
 					if (self.inList(filename)) {
-						throw t('files', '{newName} already exists', {newName: filename});
+						throw t('files', '{newName} already exists', {newName: filename}, undefined, {
+							escape: false
+						});
 					}
 				}
 				return true;
diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js
index f6cf87a55bfb1fb51cfdae2a938aaa7324a435c3..75c4cdcc0bac2fd81cb6f28a096a1f7cee8eaba0 100644
--- a/apps/files/js/newfilemenu.js
+++ b/apps/files/js/newfilemenu.js
@@ -146,7 +146,9 @@
 					if (!Files.isFileNameValid(filename)) {
 						// Files.isFileNameValid(filename) throws an exception itself
 					} else if (self.fileList.inList(filename)) {
-						throw t('files', '{newname} already exists', {newname: filename});
+						throw t('files', '{newName} already exists', {newName: filename}, undefined, {
+							escape: false
+						});
 					} else {
 						return true;
 					}