fix(recorders): escape d.error in renderProbeResult to prevent XSS

This commit is contained in:
Zac Gaetano 2026-05-19 00:46:12 -04:00
parent 9c83698b81
commit 76b0a5e05e

View file

@ -823,7 +823,7 @@
if (!d.ok) {
host.style.borderColor = 'oklch(62% 0.22 25 / 0.5)';
host.style.background = 'oklch(62% 0.22 25 / 0.08)';
host.innerHTML = '<div style="color:var(--status-red);font-weight:500;margin-bottom:4px">No signal detected</div><div style="color:var(--text-secondary);white-space:pre-wrap">' + (d.error || 'Unknown error') + '</div>';
host.innerHTML = '<div style="color:var(--status-red);font-weight:500;margin-bottom:4px">No signal detected</div><div style="color:var(--text-secondary);white-space:pre-wrap">' + esc(d.error || 'Unknown error') + '</div>';
return;
}
host.style.borderColor = 'oklch(68% 0.18 148 / 0.5)';