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:
parent
e46513cc1a
commit
4ed4b572f2
10 changed files with 25 additions and 26 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue