From a0054c760f21bd346e8cb6778222c1bd42aeff9c Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Thu, 29 Jun 2023 22:28:11 +0100 Subject: [PATCH] do not escape HTML special chars for an invite's welcomeNote --- src/libs/actions/Policy.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index bad48978b0e1..298646eedb5a 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -403,8 +403,9 @@ function addMembersToWorkspace(invitedEmailsToAccountIDs, welcomeNote, policyID, const params = { employees: JSON.stringify(_.map(logins, (login) => ({email: login}))), - // Escape HTML special chars to enable them to appear in the invite email - welcomeNote: _.escape(welcomeNote), + // Do not escape HTML special chars for welcomeNote as this will be handled in the backend. + // See https://github.com/Expensify/App/issues/20081 for more details. + welcomeNote, policyID, }; if (!_.isEmpty(membersChats.reportCreationData)) {