Fix — HTML entities rendering as literal text in JS textContent
textContent treats — as a plain string; replaced with innerHTML for static dash placeholders, and — JS escape where user input is concatenated. Also removed a dead textContent line in timeclock-kiosk.js that was immediately overwritten by innerHTML on the next line. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2936,8 +2936,12 @@
|
||||
profitEl.className = profit >= 0 ? 'text-success' : 'text-danger';
|
||||
|
||||
document.getElementById('costingMargin').textContent = `${d.grossMargin}%`;
|
||||
document.getElementById('costingQuotedMargin').textContent =
|
||||
d.quotedPrice > 0 ? `${d.quotedMargin}% (quoted ${fmt(d.quotedPrice)})` : '—';
|
||||
const quotedMarginEl = document.getElementById('costingQuotedMargin');
|
||||
if (d.quotedPrice > 0) {
|
||||
quotedMarginEl.textContent = `${d.quotedMargin}% (quoted ${fmt(d.quotedPrice)})`;
|
||||
} else {
|
||||
quotedMarginEl.innerHTML = '—';
|
||||
}
|
||||
|
||||
// Powder detail lines
|
||||
const pBody = document.getElementById('powderLines');
|
||||
|
||||
Reference in New Issue
Block a user