Do not use html from the backend

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-10-21 19:52:27 +02:00
parent 202637ca43
commit 04ce65d475

View file

@ -4,6 +4,7 @@ import { FormattedMessage } from 'react-intl';
import { Link, useHistory } from 'react-router-dom';
import Icon from 'bigbuffet/components/icon';
import Emojify from 'bigbuffet/features/emoji';
import { onlyEmoji as isOnlyEmoji } from 'bigbuffet/utils/rich-content';
import { ParsedContent } from './parsed-content';
@ -150,7 +151,7 @@ const StatusContent: React.FC<IStatusContent> = ({ status, collapsable = false }
if (status.spoiler_text) {
output.push(
<p key='status-title' className='status-title'>
<span dangerouslySetInnerHTML={{ __html: status.spoiler_text }} />
<Emojify text={status.spoiler_text} emojis={status.emojis} />
</p>,
);
}