From 8b96f4dc8af0b621c1076a0c170c6c4ecbbf9dcb Mon Sep 17 00:00:00 2001 From: koko210Serve Date: Sat, 28 Feb 2026 23:30:05 +0200 Subject: [PATCH] cleanup: remove duplicate escapeHtml function, add null check to remaining one --- bot/static/index.html | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/bot/static/index.html b/bot/static/index.html index 84e0524..0748199 100644 --- a/bot/static/index.html +++ b/bot/static/index.html @@ -4042,6 +4042,7 @@ function scrollLogsToBottom() { } function escapeHtml(text) { + if (!text) return ''; const div = document.createElement('div'); div.textContent = text; return div.innerHTML; @@ -5908,13 +5909,6 @@ function filterMemories(listId, searchTerm) { }); } -function escapeHtml(str) { - if (!str) return ''; - const div = document.createElement('div'); - div.textContent = str; - return div.innerHTML; -} - function escapeJsonForAttribute(obj) { // Properly escape JSON for use in HTML attributes return JSON.stringify(obj)