mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 12:45:51 +00:00
Update WorldEditor.js
This commit is contained in:
@@ -173,9 +173,18 @@ class WorldEditor {
|
|||||||
|
|
||||||
const fragment = document.createDocumentFragment();
|
const fragment = document.createDocumentFragment();
|
||||||
this.filteredEntries.forEach(e => {
|
this.filteredEntries.forEach(e => {
|
||||||
const row = document.createElement('div');
|
const rowHTML = this.renderEntryRow(e).trim();
|
||||||
row.innerHTML = this.renderEntryRow(e).trim();
|
const tempDiv = document.createElement('div');
|
||||||
fragment.appendChild(row.firstChild);
|
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);
|
container.appendChild(fragment);
|
||||||
this.bindEntryEvents();
|
this.bindEntryEvents();
|
||||||
|
|||||||
Reference in New Issue
Block a user