mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
fix: render HTML link in bio
This commit is contained in:
parent
40c24d927f
commit
e3fec6b938
1 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
import { NSchema as n } from '@nostrify/nostrify';
|
import { NSchema as n } from '@nostrify/nostrify';
|
||||||
import { escape } from 'entities';
|
|
||||||
import { nip19, UnsignedEvent } from 'nostr-tools';
|
import { nip19, UnsignedEvent } from 'nostr-tools';
|
||||||
|
|
||||||
import { Conf } from '@/config.ts';
|
import { Conf } from '@/config.ts';
|
||||||
|
|
@ -7,6 +6,7 @@ import { MastodonAccount } from '@/entities/MastodonAccount.ts';
|
||||||
import { type DittoEvent } from '@/interfaces/DittoEvent.ts';
|
import { type DittoEvent } from '@/interfaces/DittoEvent.ts';
|
||||||
import { getLnurl } from '@/utils/lnurl.ts';
|
import { getLnurl } from '@/utils/lnurl.ts';
|
||||||
import { parseAndVerifyNip05 } from '@/utils/nip05.ts';
|
import { parseAndVerifyNip05 } from '@/utils/nip05.ts';
|
||||||
|
import { parseNoteContent, stripimeta } from '@/utils/note.ts';
|
||||||
import { getTagSet } from '@/utils/tags.ts';
|
import { getTagSet } from '@/utils/tags.ts';
|
||||||
import { faviconCache } from '@/utils/favicon.ts';
|
import { faviconCache } from '@/utils/favicon.ts';
|
||||||
import { nostrDate, nostrNow } from '@/utils.ts';
|
import { nostrDate, nostrNow } from '@/utils.ts';
|
||||||
|
|
@ -57,6 +57,7 @@ async function renderAccount(
|
||||||
favicon = new URL('/favicon.ico', `https://${parsed05.domain}/`);
|
favicon = new URL('/favicon.ico', `https://${parsed05.domain}/`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const { html } = parseNoteContent(stripimeta(about || '', event.tags), []);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: pubkey,
|
id: pubkey,
|
||||||
|
|
@ -77,7 +78,7 @@ async function renderAccount(
|
||||||
header_static: banner,
|
header_static: banner,
|
||||||
last_status_at: null,
|
last_status_at: null,
|
||||||
locked: false,
|
locked: false,
|
||||||
note: about ? escape(about) : '',
|
note: html,
|
||||||
roles: [],
|
roles: [],
|
||||||
source: opts.withSource
|
source: opts.withSource
|
||||||
? {
|
? {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue