mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 12:45:51 +00:00
Update page-window.js
This commit is contained in:
@@ -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, """)
|
||||||
|
.replace(/'/g, "'");
|
||||||
|
}
|
||||||
|
|
||||||
export function showSummaryModal(summaryText, callbacks) {
|
export function showSummaryModal(summaryText, callbacks) {
|
||||||
const { onConfirm, onRegenerate, onCancel } = callbacks;
|
const { onConfirm, onRegenerate, onCancel } = callbacks;
|
||||||
|
|
||||||
const modalHtml = `
|
const modalHtml = `
|
||||||
<div class="historiographer-summary-modal">
|
<div class="historiographer-summary-modal">
|
||||||
<textarea class="text_pole" style="width: 100%; height: 50vh; resize: vertical;">${summaryText}</textarea>
|
<textarea class="text_pole" style="width: 100%; height: 50vh; resize: vertical;">${escapeHtml(summaryText)}</textarea>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user