Fix profile metadata labels and values could have shortcode emojis

This commit is contained in:
Lim Chee Aun 2023-01-25 16:25:23 +08:00
parent 20b0a80c45
commit 7c4bda105b

View file

@ -2,6 +2,7 @@ import './account.css';
import { useEffect, useState } from 'preact/hooks';
import emojifyText from '../utils/emojify-text';
import enhanceContent from '../utils/enhance-content';
import handleAccountLinks from '../utils/handle-account-links';
import shortenNumber from '../utils/shorten-number';
@ -171,12 +172,16 @@ function Account({ account }) {
key={name}
>
<b>
{name}{' '}
<span
dangerouslySetInnerHTML={{
__html: emojifyText(name, emojis),
}}
/>{' '}
{!!verifiedAt && <Icon icon="check-circle" size="s" />}
</b>
<p
dangerouslySetInnerHTML={{
__html: value,
__html: enhanceContent(value, { emojis }),
}}
/>
</div>