fix(admin): escapeH crashed on numbers (intake search cards)
Intake 'Find & stage' renders it.year (an int) through escapeH → (1977).replace is not a function → the whole results render threw. escapeH now coerces via String() so numbers/null are safe everywhere. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
1695b2dfbb
commit
03be6bb67f
@ -834,7 +834,7 @@ async function mapFind(){
|
||||
|
||||
// ---------- helpers ----------
|
||||
function vSoon(title, body){ return () => { $('#content').innerHTML = `<h2>${title}</h2><div class="card soon">${body}<br><br>Coming next.</div>`; }; }
|
||||
function escapeH(s){ return (s||'').replace(/[&<>"]/g, c => ({'&':'&','<':'<','>':'>','"':'"'}[c])); }
|
||||
function escapeH(s){ return (s==null?'':String(s)).replace(/[&<>"]/g, c => ({'&':'&','<':'<','>':'>','"':'"'}[c])); }
|
||||
|
||||
if(TOKEN){ $('#tok').value = TOKEN; signin(); }
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user