mirror of
https://github.com/aljazceru/ditto.git
synced 2026-02-23 14:06:58 +01:00
Hide non-profile nostr URIs from text
This commit is contained in:
@@ -50,9 +50,12 @@ function parseNoteContent(content: string, mentions: MastodonMention[]): ParsedN
|
||||
const name = mention?.acct ?? npub.substring(0, 8);
|
||||
const href = mention?.url ?? Conf.local(`/@${acct}`);
|
||||
return html`<span class="h-card"><a class="u-url mention" href="${href}" rel="ugc">@<span>${name}</span></a></span>${extra}`;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return content;
|
||||
}
|
||||
return content;
|
||||
}
|
||||
} catch {
|
||||
// fallthrough
|
||||
|
||||
Reference in New Issue
Block a user