mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 11:35:50 +00:00
Update WorldEditor.js
This commit is contained in:
@@ -173,9 +173,18 @@ class WorldEditor {
|
||||
|
||||
const fragment = document.createDocumentFragment();
|
||||
this.filteredEntries.forEach(e => {
|
||||
const row = document.createElement('div');
|
||||
row.innerHTML = this.renderEntryRow(e).trim();
|
||||
fragment.appendChild(row.firstChild);
|
||||
const rowHTML = this.renderEntryRow(e).trim();
|
||||
const tempDiv = document.createElement('div');
|
||||
tempDiv.innerHTML = rowHTML;
|
||||
const rowElement = tempDiv.firstChild;
|
||||
|
||||
// Safely set the content to prevent HTML rendering
|
||||
const contentCell = rowElement.querySelector('.world-editor-entry-content');
|
||||
if (contentCell) {
|
||||
contentCell.textContent = e.content || '';
|
||||
}
|
||||
|
||||
fragment.appendChild(rowElement);
|
||||
});
|
||||
container.appendChild(fragment);
|
||||
this.bindEntryEvents();
|
||||
|
||||
Reference in New Issue
Block a user