Skip to content

Commit b37e1ed

Browse files
authored
Merge pull request #460 from nextcloud/issue-459-html-decoded-error-message-when-uploading-folder
Fix the HTML encoding when uploading a folder in FF when using french…
2 parents f414c66 + 45c99c2 commit b37e1ed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/files/js/file-upload.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,9 @@ OC.Upload = {
474474
} else {
475475
// HTTP connection problem
476476
var message = t('files', 'Error uploading file "{fileName}": {message}', {
477-
fileName: data.files[0].name,
477+
fileName: escapeHTML(data.files[0].name),
478478
message: data.errorThrown
479-
});
479+
}, undefined, {escape: false});
480480
OC.Notification.show(message, {timeout: 0, type: 'error'});
481481
if (data.result) {
482482
var result = JSON.parse(data.result);

core/js/js.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ OC.Notification={
11271127
*
11281128
* @param {string} text Message to display
11291129
* @param {Object} [options] options
1130-
* @param {string] [options.type] notification type
1130+
* @param {string} [options.type] notification type
11311131
* @param {int} [options.timeout=0] timeout value, defaults to 0 (permanent)
11321132
* @return {jQuery} jQuery element for notification row
11331133
*/
@@ -1143,7 +1143,7 @@ OC.Notification={
11431143
* @param {array} [options] options array
11441144
* @param {int} [options.timeout=7] timeout in seconds, if this is 0 it will show the message permanently
11451145
* @param {boolean} [options.isHTML=false] an indicator for HTML notifications (true) or text (false)
1146-
* @param {string] [options.type] notification type
1146+
* @param {string} [options.type] notification type
11471147
*/
11481148
showTemporary: function(text, options) {
11491149
var self = this;

0 commit comments

Comments
 (0)