diff --git a/glossary/GT_bindings.js b/glossary/GT_bindings.js index 24452f7..8c7bb46 100644 --- a/glossary/GT_bindings.js +++ b/glossary/GT_bindings.js @@ -6,6 +6,7 @@ import { testSybdApiConnection, fetchSybdModels } from '../core/api/SybdApi.js'; import { handleFileUpload, processNovel } from './index.js'; import { reorganizeEntriesByHeadings, loadDatabaseFiles } from './executor.js'; import { SETTINGS_KEY as PRESET_SETTINGS_KEY } from '../PresetSettings/config.js'; +import { escapeHTML } from '../utils/utils.js'; const moduleState = { selectedWorldBook: '', @@ -267,12 +268,12 @@ async function renderWorldBookEntries() { } if (source && target) { - body += `
| 源头 | 关系 | 目标 |
|---|
${content}`;
+ return `${escapeHTML(content)}`;
}
}
if (trimmedContent.includes('|') && trimmedContent.includes('\n')) {
@@ -283,7 +284,7 @@ async function renderWorldBookEntries() {
let isHeaderRow = true;
rows.forEach(rowStr => {
if (rowStr.includes('---')) return;
- const cells = rowStr.split('|').filter(c => c.trim()).map(cell => `${content}`;
+ return `${escapeHTML(content)}`;
}
}
- return `${content}`;
+ return `${escapeHTML(content)}`;
};
entryElement.innerHTML = `