Skip to content

Commit

Permalink
fixup! fix(NewMessage): store caption without html escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
DorraJaouad committed Dec 5, 2023
1 parent 34bc6aa commit 6ec85e8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/NewMessage/NewMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,12 @@ export default {
}
// FIXME upstream: https://github.com/nextcloud-libraries/nextcloud-vue/issues/4492
const temp = document.createElement('textarea')
temp.innerHTML = this.text.replace(/&/gmi, '&')
this.text = temp.value.replace(/&amp;/gmi, '&').replace(/&lt;/gmi, '<')
.replace(/&gt;/gmi, '>').replace(/&sect;/gmi, '§')
if (this.text !== '') {
const temp = document.createElement('textarea')
temp.innerHTML = this.text.replace(/&/gmi, '&amp;')
this.text = temp.value.replace(/&amp;/gmi, '&').replace(/&lt;/gmi, '<')
.replace(/&gt;/gmi, '>').replace(/&sect;/gmi, '§')
}
if (this.upload) {
// Clear input content from store
Expand Down

0 comments on commit 6ec85e8

Please sign in to comment.