better chat message sanitization (#1266)

* strip <p> in chat sanitization, keep the content

* update sanitization tests

* update tests

* rm <p></p> comparison for empty messages
This commit is contained in:
Meisam
2021-07-28 00:26:27 +02:00
committed by GitHub
parent 92284f6ca1
commit 109d2669ab
4 changed files with 12 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ test('can fetch chat messages', async (done) => {
.auth('admin', 'abc123')
.expect(200);
const expectedBody = `<p>${testMessage.body}</p>`
const expectedBody = `${testMessage.body}`
const message = res.body.filter(function (msg) {
return msg.body === expectedBody
})[0];