From 8a53f41ad40e1ad4687281efd508f6468226fc92 Mon Sep 17 00:00:00 2001 From: Anton Roslund Date: Mon, 14 Jul 2025 16:22:06 +0200 Subject: [PATCH] Potential fix for code scanning alert no. 2: Replacement of a substring with itself Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- static/js/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/messages.js b/static/js/messages.js index b97af28..cba4ee4 100644 --- a/static/js/messages.js +++ b/static/js/messages.js @@ -140,7 +140,7 @@ document.addEventListener("DOMContentLoaded", async function () { function formatMessageTimestamp(createdAt) { const date = new Date(createdAt); - return date.toLocaleString('sv-SE', { hour12: false }).replace(' ', ' ').slice(0, 16); + return date.toLocaleString('sv-SE', { hour12: false }).slice(0, 16); } await fetchMessages();