From 15d8c6f3dab19c7f51ad00b2fc377bf6eaa7f819 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 2 Sep 2026 18:59:38 -0700 Subject: A raw npub in a bio stops punching through the profile card: the about text renders through noteBody like any note — npub mentions become clickable @names, other nostr: refs truncate to stubs, URLs linkify — with overflow-wrap catching whatever unbreakable string remains MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr --- src/features/messages.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/features/messages.js b/src/features/messages.js index 3f494e4..ca56335 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -1905,7 +1905,14 @@ export function messagesFeature(ctx) { mine ? hook('hatShopEntry') : null)), // no spinner while the kind 0 loads — prefetch keeps this rare, and // an empty beat reads calmer than a spinner - showAbout && !ui.profEdit ? h('p', { class: 'small', style: 'margin:0;white-space:pre-wrap' }, about.slice(0, 1000)) : null, + // The bio rides the same renderer as notes: npub mentions become + // @names, other nostr: refs truncate to stubs, URLs linkify — and + // overflow-wrap catches any remaining unbreakable token (a raw npub + // in a bio was punching clean through the card). + showAbout && !ui.profEdit + ? h('p', { class: 'small', style: 'margin:0;white-space:pre-wrap;overflow-wrap:anywhere' }, + ...noteBody(about.slice(0, 1000))) + : null, // your own npub stays out of the editor — it means nothing to most // people, and the account settings still show it to those who care mine ? null : h('button', { -- cgit v1.2.3