diff --git a/index.html b/index.html index 49dba3fc..a4136c8b 100644 --- a/index.html +++ b/index.html @@ -1432,7 +1432,14 @@
hasAny = true; const badge = document.createElement('span'); badge.className = 'active-badge'; - badge.innerHTML = `${val}`; + badge.appendChild(document.createTextNode(val)); + const rm = document.createElement('button'); + rm.className = 'active-badge-remove'; + rm.dataset.filter = key; + rm.dataset.value = val; + rm.setAttribute('aria-label', `Remove ${val}`); + rm.textContent = '×'; + badge.appendChild(rm); activeFilEl.appendChild(badge); }); }; @@ -1482,7 +1489,14 @@ metaItems.forEach(({ label, value }) => { const chip = document.createElement('div'); chip.className = 'meta-chip'; - chip.innerHTML = ``; + const labelEl = document.createElement('span'); + labelEl.className = 'meta-chip-label'; + labelEl.textContent = label; + const valueEl = document.createElement('span'); + valueEl.className = 'meta-chip-value'; + valueEl.textContent = value ?? ''; + chip.appendChild(labelEl); + chip.appendChild(valueEl); modalMeta.appendChild(chip); }); @@ -1544,7 +1558,14 @@ steps.forEach((step, i) => { const li = document.createElement('li'); li.className = 'instruction-step'; - li.innerHTML = `${i + 1}${step}`; + const num = document.createElement('span'); + num.className = 'step-num'; + num.textContent = i + 1; + const text = document.createElement('span'); + text.className = 'step-text'; + text.textContent = step; + li.appendChild(num); + li.appendChild(text); list.appendChild(li); }); }