did i change anything

This commit is contained in:
sam 2024-03-02 16:29:42 +13:00
parent 1cc5508506
commit 26d3765073

View file

@ -30,9 +30,13 @@ app.get("/channels/:channel", async (req, res) => {
});
});
function sanitize(text) {
return text.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
}
function constructMessage(msg) {
return `<div>
<span>${msg.author.username}</span>: ${msg.content}
<span>${sanitize(msg.author.username)}</span>: ${sanitize(msg.content)}
</div>`;
}