// For small HTML responses generated by the main process, such as OAuth
// callback pages and startup splash templates. The Electron renderer uses its
// own sanitized rendering paths and should not depend on this helper.
export function escapeHtml(value: unknown) {
  return String(value)
    .replaceAll('&', '&amp;')
    .replaceAll('<', '&lt;')
    .replaceAll('>', '&gt;')
    .replaceAll('"', '&quot;')
    .replaceAll('\'', '&#39;')
}
