mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
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:
@@ -16,7 +16,7 @@ export const notificationBubble = document.createElement('span');
|
|||||||
export const setBubbleText = bubbleText => {
|
export const setBubbleText = bubbleText => {
|
||||||
if (isExpandedView(window.$chatwoot.type)) {
|
if (isExpandedView(window.$chatwoot.type)) {
|
||||||
const textNode = document.getElementById('woot-widget--expanded__text');
|
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)) {
|
if (isExpandedView(window.$chatwoot.type)) {
|
||||||
const textNode = document.createElement('div');
|
const textNode = document.createElement('div');
|
||||||
textNode.id = 'woot-widget--expanded__text';
|
textNode.id = 'woot-widget--expanded__text';
|
||||||
textNode.innerHTML = '';
|
textNode.innerText = '';
|
||||||
target.appendChild(textNode);
|
target.appendChild(textNode);
|
||||||
bubbleClassName += ' woot-widget--expanded';
|
bubbleClassName += ' woot-widget--expanded';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user