Try to fix build errors on some platforms.

Thanks to xet7 !

Related #4842
This commit is contained in:
Lauri Ojansivu 2023-02-21 21:27:34 +02:00
parent f1092c6f40
commit fd9478dc57
5 changed files with 12 additions and 468 deletions

View file

@ -228,7 +228,9 @@ BlazeComponent.extendComponent({
const name = this.$('.js-edit-attachment-name')[0]
.value
.trim() + this.data().extensionWithDot;
Meteor.call('renameAttachment', this.data()._id, name);
if (name === DOMPurify.sanitize(name)) {
Meteor.call('renameAttachment', this.data()._id, name);
}
Popup.back(2);
},
}