Better XSS Fix (#12483)

* Revert "fix(test): adjust expectations"

This reverts commit 205436d5b1.

* Revert "fix(escaping): global inoffensive apostrophe"

This reverts commit 2b8f94b244.

* change <%- to <%=

* fix interpolation only where necessary

* remove unused variable
This commit is contained in:
Matteo Pagliazzi
2020-08-20 20:41:46 +02:00
committed by GitHub
parent 8248c4ca4e
commit 9a07ba7417
1679 changed files with 67532 additions and 67548 deletions

View File

@@ -6,7 +6,7 @@
:hide-footer="true"
>
<div class="modal-body">
<strong v-html="$t('abuseFlagModalHeading', reportData)"></strong>
<strong v-html="$t('abuseFlagModalHeading')"></strong>
<blockquote>
<div v-markdown="abuseObject.text"></div>
</blockquote>
@@ -113,14 +113,6 @@ export default {
},
computed: {
...mapState({ user: 'user.data' }),
reportData () {
let reportMessage = this.abuseObject.user;
const isSystemMessage = this.abuseObject.uuid === 'system';
if (isSystemMessage) reportMessage = this.$t('systemMessage');
return {
name: `<span class='text-danger'>${reportMessage}</span>`,
};
},
},
mounted () {
this.$root.$on('habitica::report-chat', this.handleReport);