diff --git a/bot/static/index.html b/bot/static/index.html index 7faf356..c82a801 100644 --- a/bot/static/index.html +++ b/bot/static/index.html @@ -5024,12 +5024,15 @@ function addChatMessage(sender, content, isError = false) { messageDiv.innerHTML = `
- ${sender} + ${escapeHtml(sender)} ${timestamp}
-
${content}
+
`; + // Set content via textContent to prevent XSS + messageDiv.querySelector('.chat-message-content').textContent = content; + chatMessages.appendChild(messageDiv); // Scroll to bottom