Replace literal em-dashes with — HTML entities

Fixes garbled display ("â€"") on Windows where the UTF-8 bytes for U+2014
were being misread as Windows-1252. All em-dash occurrences in index.html,
app.js, and common.js are now expressed as HTML entities.

https://claude.ai/code/session_01JuRTR5Xjx8emQsyerBgGU7
This commit is contained in:
Claude 2026-05-30 16:42:46 +00:00
parent 4125972b67
commit 79ae833fa9
No known key found for this signature in database
3 changed files with 11 additions and 11 deletions

View file

@ -67,7 +67,7 @@ function populateTransferTypes() {
const sel = document.getElementById(id); const sel = document.getElementById(id);
if (!sel) return; if (!sel) return;
const prev = sel.value; const prev = sel.value;
sel.innerHTML = '<option value="">— select —</option>' + sel.innerHTML = '<option value="">&mdash; select &mdash;</option>' +
types.map(t => `<option value="${esc(t)}">${esc(t)}</option>`).join(''); types.map(t => `<option value="${esc(t)}">${esc(t)}</option>`).join('');
if (prev && types.includes(prev)) sel.value = prev; if (prev && types.includes(prev)) sel.value = prev;
}); });

View file

@ -54,7 +54,7 @@ async function loadStaffInto(selectId) {
try { try {
const data = await apiFetch('/staff'); const data = await apiFetch('/staff');
const saved = sessionStorage.getItem('lastStaff') || ''; const saved = sessionStorage.getItem('lastStaff') || '';
sel.innerHTML = '<option value="">— select staff —</option>' + sel.innerHTML = '<option value="">&mdash; select staff &mdash;</option>' +
data.staff.map(n => `<option value="${esc(n)}"${n === saved ? ' selected' : ''}>${esc(n)}</option>`).join(''); data.staff.map(n => `<option value="${esc(n)}"${n === saved ? ' selected' : ''}>${esc(n)}</option>`).join('');
sel.addEventListener('change', () => { sel.addEventListener('change', () => {
if (sel.value) sessionStorage.setItem('lastStaff', sel.value); if (sel.value) sessionStorage.setItem('lastStaff', sel.value);
@ -67,7 +67,7 @@ async function refreshAllStaffDropdowns() {
const data = await apiFetch('/staff'); const data = await apiFetch('/staff');
const saved = sessionStorage.getItem('lastStaff') || ''; const saved = sessionStorage.getItem('lastStaff') || '';
document.querySelectorAll('select[id$="Staff"]').forEach(sel => { document.querySelectorAll('select[id$="Staff"]').forEach(sel => {
sel.innerHTML = '<option value="">— select staff —</option>' + sel.innerHTML = '<option value="">&mdash; select staff &mdash;</option>' +
data.staff.map(n => `<option value="${esc(n)}"${n === saved ? ' selected' : ''}>${esc(n)}</option>`).join(''); data.staff.map(n => `<option value="${esc(n)}"${n === saved ? ' selected' : ''}>${esc(n)}</option>`).join('');
}); });
renderStaffChips(data.staff); renderStaffChips(data.staff);

View file

@ -100,7 +100,7 @@
<div class="form-row"> <div class="form-row">
<label>Transfer Type</label> <label>Transfer Type</label>
<select id="cashierTransferType"> <select id="cashierTransferType">
<option value="">— select —</option> <option value="">&mdash; select &mdash;</option>
</select> </select>
</div> </div>
<div class="form-row"> <div class="form-row">
@ -128,7 +128,7 @@
<div class="form-row"> <div class="form-row">
<label>Transfer Type</label> <label>Transfer Type</label>
<select id="withdrawalTransferType"> <select id="withdrawalTransferType">
<option value="">— select —</option> <option value="">&mdash; select &mdash;</option>
</select> </select>
</div> </div>
<div class="form-row"> <div class="form-row">
@ -209,9 +209,9 @@
<select id="s-overdraft-policy"> <select id="s-overdraft-policy">
<option value="never">Not allowed</option> <option value="never">Not allowed</option>
<option value="always">Allowed for all</option> <option value="always">Allowed for all</option>
<option value="staff_override">Default not allowed staff may override per charge</option> <option value="staff_override">Default not allowed &mdash; staff may override per charge</option>
<option value="admin_override">Default not allowed admin may override per charge</option> <option value="admin_override">Default not allowed &mdash; admin may override per charge</option>
<option value="staff_block">Default allowed staff may block per charge</option> <option value="staff_block">Default allowed &mdash; staff may block per charge</option>
</select> </select>
</div> </div>
@ -268,11 +268,11 @@
<div class="panel-divider"></div> <div class="panel-divider"></div>
<h3 class="sub-heading">Receipt Footers</h3> <h3 class="sub-heading">Receipt Footers</h3>
<div class="form-row"><label>Footer all <span class="label-hint">(fallback for all receipts and statement)</span></label> <div class="form-row"><label>Footer &mdash; all <span class="label-hint">(fallback for all receipts and statement)</span></label>
<textarea id="s-receipt-footer" rows="2" placeholder="Printed at the bottom of every receipt and statement"></textarea></div> <textarea id="s-receipt-footer" rows="2" placeholder="Printed at the bottom of every receipt and statement"></textarea></div>
<div class="form-row"><label>Footer charge receipts <span class="label-hint">(overrides all-footer for bar charges)</span></label> <div class="form-row"><label>Footer &mdash; charge receipts <span class="label-hint">(overrides all-footer for bar charges)</span></label>
<textarea id="s-receipt-footer-charge" rows="2"></textarea></div> <textarea id="s-receipt-footer-charge" rows="2"></textarea></div>
<div class="form-row"><label>Footer cashier receipts <span class="label-hint">(overrides all-footer for top-ups and withdrawals)</span></label> <div class="form-row"><label>Footer &mdash; cashier receipts <span class="label-hint">(overrides all-footer for top-ups and withdrawals)</span></label>
<textarea id="s-receipt-footer-cashier" rows="2"></textarea></div> <textarea id="s-receipt-footer-cashier" rows="2"></textarea></div>
<button type="submit" class="btn btn-primary" style="margin-top:8px">Save Settings</button> <button type="submit" class="btn btn-primary" style="margin-top:8px">Save Settings</button>