fix: use innerText instead of innerHTML (#6431)

* refactor: use inner text instead of inner html

* refactor: use innerText instead of innerHTML
This commit is contained in:
Shivam Mishra
2023-02-10 17:20:15 +05:30
committed by GitHub
parent 8db40f2d82
commit a06a5a574a

View File

@@ -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';
}