chat: Ensure that ctx.text is interpreted as HTML

This commit is contained in:
Richard Hansen 2021-04-08 23:39:44 -04:00 committed by webzwo0i
parent a3a0ff7bc1
commit d01b593d3c

View file

@ -194,7 +194,7 @@ exports.chat = (() => {
.append($('<span>').addClass('author-name').text(ctx.authorName))
// ctx.text was HTML-escaped before calling the hook. Hook functions are trusted
// to not introduce an XSS vulnerability by adding unescaped user input.
.append(ctx.text),
.append($('<div>').html(ctx.text).contents()),
sticky: ctx.sticky,
time: 5000,
position: 'bottom',