mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Better XSS Fix (#12483)
* Revert "fix(test): adjust expectations" This reverts commit205436d5b1. * Revert "fix(escaping): global inoffensive apostrophe" This reverts commit2b8f94b244. * change <%- to <%= * fix interpolation only where necessary * remove unused variable
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user