Skip to content

Commit

Permalink
🐛 html-encode chat messages
Browse files Browse the repository at this point in the history
  • Loading branch information
haliphax committed Oct 18, 2023
1 parent 8d39c26 commit 552370e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion userland/web/static/chat/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ es.addEventListener("message", (ev) => {
<span class="notify ${message.user ? "user" : "system"}">
&lt;${message.user ?? "*"}&gt;
</span>
<span class="message">${message.message}</span>
<span class="message"></span>
`;
li.querySelector(".message").innerText = message.message;

ul.appendChild(li);
});
Expand Down

0 comments on commit 552370e

Please sign in to comment.