// Shared route helpers for web view rendering and player URL formatting. function escapeHtml(value) { return String(value ?? '') .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"') .replace(/'/g, '''); } function screenPlayerUrl(slug, baseUrl) { const normalizedBaseUrl = String(baseUrl || '').trim().replace(/\/$/, ''); if (!normalizedBaseUrl) { return ''; } return `${normalizedBaseUrl}/screen/${encodeURIComponent(slug)}`; } module.exports = { escapeHtml, screenPlayerUrl };