strip html from text

This commit is contained in:
ogerly 2022-10-05 08:19:11 +02:00
parent ce3d9b1708
commit 68e24a5973
3 changed files with 3 additions and 2 deletions

View File

@ -47,7 +47,7 @@ export default {
mutation: adminCreateContributionMessage,
variables: {
contributionId: this.contributionId,
message: this.form.text,
message: this.form.text.replace(/(<([^>]+)>)/gi, ''),
},
})
.then((result) => {

View File

@ -47,7 +47,7 @@ export default {
mutation: createContributionMessage,
variables: {
contributionId: this.contributionId,
message: this.form.text,
message: this.form.text.replace(/(<([^>]+)>)/gi, ''),
},
})
.then((result) => {

View File

@ -108,6 +108,7 @@ export default {
submit() {
this.form.amount = this.numberFormat(this.form.amount)
// spreading is needed for testing
this.form.memo = this.form.memo.replace(/(<([^>]+)>)/gi, '')
this.$emit(this.form.id ? 'update-contribution' : 'set-contribution', { ...this.form })
this.reset()
},