diff --git a/server.js b/server.js index 9df1197..02f8960 100644 --- a/server.js +++ b/server.js @@ -30,9 +30,13 @@ app.get("/channels/:channel", async (req, res) => { }); }); +function sanitize(text) { + return text.replaceAll("<", "<").replaceAll(">", ">"); +} + function constructMessage(msg) { return `
- ${msg.author.username}: ${msg.content} + ${sanitize(msg.author.username)}: ${sanitize(msg.content)}
`; }