From a06a5a574ad908b0ef2db7b47d05c3774eeb493d Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 10 Feb 2023 17:20:15 +0530 Subject: [PATCH] fix: use innerText instead of innerHTML (#6431) * refactor: use inner text instead of inner html * refactor: use innerText instead of innerHTML --- app/javascript/sdk/bubbleHelpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/sdk/bubbleHelpers.js b/app/javascript/sdk/bubbleHelpers.js index f2da5e74f..54401a82c 100644 --- a/app/javascript/sdk/bubbleHelpers.js +++ b/app/javascript/sdk/bubbleHelpers.js @@ -16,7 +16,7 @@ export const notificationBubble = document.createElement('span'); export const setBubbleText = bubbleText => { if (isExpandedView(window.$chatwoot.type)) { const textNode = document.getElementById('woot-widget--expanded__text'); - textNode.innerHTML = bubbleText; + textNode.innerText = bubbleText; } }; @@ -46,7 +46,7 @@ export const createBubbleIcon = ({ className, path, target }) => { if (isExpandedView(window.$chatwoot.type)) { const textNode = document.createElement('div'); textNode.id = 'woot-widget--expanded__text'; - textNode.innerHTML = ''; + textNode.innerText = ''; target.appendChild(textNode); bubbleClassName += ' woot-widget--expanded'; }