From 8cfdb8e2e5451a7c7cc3c4f29d6f86918d764cb9 Mon Sep 17 00:00:00 2001 From: pewdiepie-archdaemon Date: Mon, 26 Oct 2026 16:49:01 +0000 Subject: [PATCH] Render saved action labels as text instead of HTML --- static/js/editor/actions-panel.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/static/js/editor/actions-panel.js b/static/js/editor/actions-panel.js index a41d86817..5cfc61182 100644 --- a/static/js/editor/actions-panel.js +++ b/static/js/editor/actions-panel.js @@ -32,10 +32,10 @@ export const ACTION_COMMANDS = Object.freeze([ const STORAGE_KEY = 'ge-actions'; -function el(tag, className, html) { +function el(tag, className, text) { const node = document.createElement(tag); if (className) node.className = className; - if (html != null) node.innerHTML = html; + if (text != null) node.textContent = text; return node; } @@ -100,7 +100,11 @@ export function createActionsPanel({ showToast = () => {}, getLayers = null, sel } steps.forEach((step, index) => { const command = commandById(step); - const row = el('div', 'ge-actions-step', `${index + 1}${command ? command[1] : step}`); + const row = el('div', 'ge-actions-step'); + row.append( + el('span', 'ge-actions-step-index', String(index + 1)), + el('span', 'ge-actions-step-label', command ? command[1] : step), + ); const remove = el('button', 'ge-action-remove', '✕'); remove.type = 'button'; remove.addEventListener('click', () => { steps.splice(index, 1); renderList(); });