chat: Ensure that `ctx.text` is interpreted as HTML

pull/5002/head
Richard Hansen 2021-04-08 23:39:44 -04:00 committed by webzwo0i
parent a3a0ff7bc1
commit d01b593d3c
1 changed files with 1 additions and 1 deletions

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',