diff --git a/services/minecraft/src/debug/web/app.js b/services/minecraft/src/debug/web/app.js index 8d86c804b..b795b06e3 100644 --- a/services/minecraft/src/debug/web/app.js +++ b/services/minecraft/src/debug/web/app.js @@ -24,9 +24,14 @@ const SYSTEM_STATE_MARKER = 'The following blackboard provides you with informat // ============================================================================= function escapeHtml(text) { - const div = document.createElement('div') - div.textContent = text - return div.innerHTML + if (text == null) + return '' + return String(text) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, ''') } function formatSystemMessageContent(content) {