diff --git a/ui/page-window.js b/ui/page-window.js index 4dabebc..a831a1f 100644 --- a/ui/page-window.js +++ b/ui/page-window.js @@ -120,12 +120,22 @@ export function showHtmlModal(title, htmlContent, options = {}) { } +function escapeHtml(text) { + if (!text) return ''; + return text + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); +} + export function showSummaryModal(summaryText, callbacks) { const { onConfirm, onRegenerate, onCancel } = callbacks; const modalHtml = `