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:
@@ -3382,7 +3382,7 @@
|
||||
document.getElementById('ovenCalcToggle').addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
const hidden = _calcPanel.classList.toggle('d-none');
|
||||
if (!hidden) { _calcW.value = ''; _calcD.value = ''; _calcH.value = ''; _calcResult.textContent = '—'; _calcApply.disabled = true; _calcW.focus(); }
|
||||
if (!hidden) { _calcW.value = ''; _calcD.value = ''; _calcH.value = ''; _calcResult.innerHTML = '—'; _calcApply.disabled = true; _calcW.focus(); }
|
||||
});
|
||||
|
||||
function _updateCalc() {
|
||||
@@ -3402,7 +3402,7 @@
|
||||
_calcApply.disabled = false;
|
||||
_calcApply.dataset.val = val;
|
||||
} else {
|
||||
_calcResult.textContent = '—';
|
||||
_calcResult.innerHTML = '—';
|
||||
_calcApply.disabled = true;
|
||||
}
|
||||
}
|
||||
@@ -3420,7 +3420,7 @@
|
||||
document.getElementById('ovenModal').addEventListener('hidden.bs.modal', function () {
|
||||
_calcPanel.classList.add('d-none');
|
||||
_calcW.value = ''; _calcD.value = ''; _calcH.value = '';
|
||||
_calcResult.textContent = '—'; _calcApply.disabled = true;
|
||||
_calcResult.innerHTML = '—'; _calcApply.disabled = true;
|
||||
});
|
||||
// ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user