Escape html with markdown off (#732)

This commit is contained in:
Ajay Bura 2022-08-11 14:28:39 +05:30
parent 1692098d5d
commit 3c1cc59d59
3 changed files with 42 additions and 39 deletions

View file

@ -206,7 +206,13 @@ const MessageBody = React.memo(({
let content = null;
if (isCustomHTML) {
try {
content = twemojify(sanitizeCustomHtml(body), undefined, true, false, true);
content = twemojify(
sanitizeCustomHtml(initMatrix.matrixClient, body),
undefined,
true,
false,
true,
);
} catch {
console.error('Malformed custom html: ', body);
content = twemojify(body, undefined);