From 3bc921a08fc7b3306563e8a86a7efd4db1036995 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Thu, 12 Dec 2024 23:07:35 +0100 Subject: get rid of sageTags in a few places plan is to migrate to createTextNode --- webAO/client/handleBans.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'webAO/client/handleBans.ts') diff --git a/webAO/client/handleBans.ts b/webAO/client/handleBans.ts index a2e56f4..9eec9be 100644 --- a/webAO/client/handleBans.ts +++ b/webAO/client/handleBans.ts @@ -1,3 +1,5 @@ +import { safeTags } from "../encoding"; + /** * Handles the kicked packet * @param {string} type is it a kick or a ban @@ -6,7 +8,7 @@ export const handleBans = (type: string, reason: string) => { document.getElementById("client_error")!.style.display = "flex"; document.getElementById("client_errortext")!.innerHTML = - `${type}:
${reason.replace(/\n/g, "
")}`; + `${type}:
${safeTags(reason).replace(/\n/g, "
")}`; (document.getElementById("client_reconnect")).style.display = "none"; alert(type + ":\r" + reason); -- cgit