From 1550531730409bf0ed4f66efcf7f4e1939222a6e Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Thu, 12 Oct 2023 16:12:01 -0700 Subject: [PATCH] pkp/pkp-lib#9408 Permit escaping of mixed content when localizing strings --- .../announcements/AnnouncementsListPanel.vue | 10 +++++-- .../emailTemplates/EmailTemplatesListItem.vue | 30 +++++++++++++------ src/mixins/global.js | 11 +++++-- 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/src/components/ListPanel/announcements/AnnouncementsListPanel.vue b/src/components/ListPanel/announcements/AnnouncementsListPanel.vue index dcc1953ed..15b64ae66 100644 --- a/src/components/ListPanel/announcements/AnnouncementsListPanel.vue +++ b/src/components/ListPanel/announcements/AnnouncementsListPanel.vue @@ -199,9 +199,13 @@ export default { cancelLabel: this.__('common.no'), modalName: 'delete', title: this.deleteAnnouncementLabel, - message: this.replaceLocaleParams(this.confirmDeleteMessage, { - title: this.localize(announcement.title) - }), + message: this.replaceLocaleParams( + this.confirmDeleteMessage, + { + title: this.localize(announcement.title) + }, + true + ), callback: () => { var self = this; $.ajax({ diff --git a/src/components/ListPanel/emailTemplates/EmailTemplatesListItem.vue b/src/components/ListPanel/emailTemplates/EmailTemplatesListItem.vue index 226cb6589..8e3456205 100644 --- a/src/components/ListPanel/emailTemplates/EmailTemplatesListItem.vue +++ b/src/components/ListPanel/emailTemplates/EmailTemplatesListItem.vue @@ -27,23 +27,35 @@ {{ - replaceLocaleParams(this.subjectLabel, { - subject: item.subject - }) + replaceLocaleParams( + this.subjectLabel, + { + subject: item.subject + }, + true + ) }} {{ - replaceLocaleParams(this.fromLabel, { - value: getRoleLabel(item.fromRoleId) - }) + replaceLocaleParams( + this.fromLabel, + { + value: getRoleLabel(item.fromRoleId) + }, + true + ) }} {{ - replaceLocaleParams(this.toLabel, { - value: getRoleLabel(item.toRoleId) - }) + replaceLocaleParams( + this.toLabel, + { + value: getRoleLabel(item.toRoleId) + }, + true + ) }}