diff options
Diffstat (limited to 'webAO/client/handleBans.ts')
| -rw-r--r-- | webAO/client/handleBans.ts | 4 |
1 files changed, 3 insertions, 1 deletions
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}:<br>${reason.replace(/\n/g, "<br />")}`; + `${type}:<br>${safeTags(reason).replace(/\n/g, "<br />")}`; (<HTMLElement>document.getElementById("client_reconnect")).style.display = "none"; alert(type + ":\r" + reason); |
