Skip to content

Commit 1027968

Browse files
committed
Use innerText to inject style
1 parent 639d8d6 commit 1027968

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/gui/utils.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,18 +429,18 @@ function injectStyle(code, node, tag) {
429429
const styles = (node || document).getElementsByTagName('style');
430430
for (let n = 0; n < styles.length; ++n) {
431431
if (tag && styles[n].getAttribute('tag') === tag) {
432-
styles[n].innerHTML = code;
432+
styles[n].innerText = code;
433433
return true;
434434
}
435435

436-
if (styles[n].innerHTML === code)
436+
if (styles[n].innerText === code)
437437
return true;
438438
}
439439

440440
const element = document.createElement('style');
441441
if (tag)
442442
element.setAttribute('tag', tag);
443-
element.innerHTML = code;
443+
element.innerText = code;
444444
(node || document.head).appendChild(element);
445445
return true;
446446
}

0 commit comments

Comments
 (0)