". A malicious nurse name // could break out of the script context. Replace the slash so the // closing tag is never produced verbatim. script.textContent = JSON.stringify(ld).replace(/<\/(script)/gi, '<\\/$1'); document.head.appendChild(script); } async function load() { try { const res = await fetch('/api/nurses/' + encodeURIComponent(id)); if (!res.ok) { card.innerHTML = `

${t('nurse.unavailable')}

`; return; } DATA = await res.json(); injectSeo(); render(); } catch { card.innerHTML = `

${t('nurse.unavailable')}

`; } } document.addEventListener('langchange', render); if (id) load();