mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 14:16:39 +01:00
Fix profile metadata labels and values could have shortcode emojis
This commit is contained in:
parent
20b0a80c45
commit
7c4bda105b
1 changed files with 7 additions and 2 deletions
|
@ -2,6 +2,7 @@ import './account.css';
|
||||||
|
|
||||||
import { useEffect, useState } from 'preact/hooks';
|
import { useEffect, useState } from 'preact/hooks';
|
||||||
|
|
||||||
|
import emojifyText from '../utils/emojify-text';
|
||||||
import enhanceContent from '../utils/enhance-content';
|
import enhanceContent from '../utils/enhance-content';
|
||||||
import handleAccountLinks from '../utils/handle-account-links';
|
import handleAccountLinks from '../utils/handle-account-links';
|
||||||
import shortenNumber from '../utils/shorten-number';
|
import shortenNumber from '../utils/shorten-number';
|
||||||
|
@ -171,12 +172,16 @@ function Account({ account }) {
|
||||||
key={name}
|
key={name}
|
||||||
>
|
>
|
||||||
<b>
|
<b>
|
||||||
{name}{' '}
|
<span
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: emojifyText(name, emojis),
|
||||||
|
}}
|
||||||
|
/>{' '}
|
||||||
{!!verifiedAt && <Icon icon="check-circle" size="s" />}
|
{!!verifiedAt && <Icon icon="check-circle" size="s" />}
|
||||||
</b>
|
</b>
|
||||||
<p
|
<p
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: value,
|
__html: enhanceContent(value, { emojis }),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue