From 61caadbba07b7acac61c585c30575536517dddc4 Mon Sep 17 00:00:00 2001 From: Nigel Gilbert Date: Fri, 4 Oct 2024 22:09:45 +0100 Subject: [PATCH] Deal with some XSS vulnerabilities --- js/merge.js | 4 ++-- js/prsm.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/merge.js b/js/merge.js index facad46e..dfb6ee06 100644 --- a/js/merge.js +++ b/js/merge.js @@ -198,7 +198,7 @@ function mergeMaps() { export function mergeRoom(otherRoom) { openOtherDoc(otherRoom) - console.log(`%cMerging map at ${room} (map A) with map at ${otherRoom} (map B)`, 'font-weight: bold') + console.log('%cMerging map at %s (map A) with map at %s (map B)', 'font-weight: bold', room, otherRoom) bwsp.on('sync', (status) => { if (!status) return bNodesMap.forEach((n) => bdata.nodes.update(n)) @@ -324,7 +324,7 @@ function diffMaps() { } export function diffRoom(otherRoom) { openOtherDoc(otherRoom) - console.log(`%cComparing map at ${room} (map A) with map at ${otherRoom} (map B)`, 'font-weight: bold') + console.log('%cComparing map at %s (map A) with map at %s (map B)', 'font-weight: bold', room, otherRoom) bwsp.on('sync', (status) => { if (!status) return bNodesMap.forEach((n) => bdata.nodes.update(n)) diff --git a/js/prsm.js b/js/prsm.js index 7c383d3c..1be3b3d7 100644 --- a/js/prsm.js +++ b/js/prsm.js @@ -2730,7 +2730,7 @@ function createTitleDropDown() { function makeTitleDropDownEntry(name, room) { let li = document.createElement('li') li.classList.add('room-title') - li.innerHTML = name + li.textContent = name li.dataset.room = room li.addEventListener('click', (event) => changeRoom(event)) selectList.appendChild(li)