Updated client-side DOM manipulation functions to unescape char-codes before injecting them via innerText instead of raw-dogging it into innerHTML

This commit is contained in:
rainbow napkin 2025-04-12 07:21:36 -04:00
parent e46513cc1a
commit 4ed4b572f2
10 changed files with 25 additions and 26 deletions

View file

@ -330,7 +330,7 @@ class canopyUXUtils{
//Create menu title
const menuTitle = document.createElement('h2');
menuTitle.innerHTML = this.title;
menuTitle.textContent = utils.unescapeEntities(this.title);
//Append the title to the tooltip
this.tooltip.append(menuTitle);
@ -338,7 +338,7 @@ class canopyUXUtils{
for(let choice of this.menuMap){
//Create button
const button = document.createElement('button');
button.innerHTML = choice[0];
button.textContent = utils.unescapeEntities(choice[0]);
//Add event listeners
button.addEventListener('click', choice[1]);