don't render nostr:npub as a link #528

Merged
SamSamskies merged 4 commits from fix-nostr-npub-broken-links into main 2023-04-20 20:49:47 +00:00
SamSamskies commented 2023-04-19 18:59:17 +00:00 (Migrated from github.com)

resolves https://github.com/v0l/snort/issues/501

People often type the literal text nostr:npub when talking about nostr URIs. That shouldn't be converted to a link.

resolves https://github.com/v0l/snort/issues/501 People often type the literal text `nostr:npub` when talking about nostr URIs. That shouldn't be converted to a link.
cloudflare-pages[bot] commented 2023-04-19 19:00:54 +00:00 (Migrated from github.com)

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 969284e
Status:   Deploy successful!
Preview URL: https://21e202f6.snort-social.pages.dev
Branch Preview URL: https://fix-nostr-npub-broken-links.snort-social.pages.dev

View logs

## Deploying with &nbsp;<a href="https://pages.dev"><img alt="Cloudflare Pages" src="https://user-images.githubusercontent.com/23264/106598434-9e719e00-654f-11eb-9e59-6167043cfa01.png" width="16"></a> &nbsp;Cloudflare Pages <table><tr><td><strong>Latest commit:</strong> </td><td> <code>969284e</code> </td></tr> <tr><td><strong>Status:</strong></td><td>&nbsp;✅&nbsp; Deploy successful!</td></tr> <tr><td><strong>Preview URL:</strong></td><td> <a href='https://21e202f6.snort-social.pages.dev'>https://21e202f6.snort-social.pages.dev</a> </td></tr> <tr><td><strong>Branch Preview URL:</strong></td><td> <a href='https://fix-nostr-npub-broken-links.snort-social.pages.dev'>https://fix-nostr-npub-broken-links.snort-social.pages.dev</a> </td></tr> </table> [View logs](https://dash.cloudflare.com/?to=/:account/pages/view/snort-social/21e202f6-2fe9-4051-8c20-a237b2fe8956)
v0l (Migrated from github.com) requested changes 2023-04-19 22:04:16 +00:00
v0l (Migrated from github.com) left a comment

There is also an issue where parsing an invalid TLV will break the note, for example trying to preview note with content nostr:nevent1xxx

Fixing this should also fix the invalid nostr:npub

There is also an issue where parsing an invalid TLV will break the note, for example trying to preview note with content `nostr:nevent1xxx` Fixing this should also fix the invalid `nostr:npub`
SamSamskies commented 2023-04-19 23:49:45 +00:00 (Migrated from github.com)

I looked into it and that seems to be a separate issue, but I can try and fix both with this PR.

I looked into it and that seems to be a separate issue, but I can try and fix both with this PR.
SamSamskies (Migrated from github.com) reviewed 2023-04-20 00:31:34 +00:00
SamSamskies commented 2023-04-20 00:32:19 +00:00 (Migrated from github.com)

I think I was able to fix both issues.

I think I was able to fix both issues.
v0l (Migrated from github.com) reviewed 2023-04-20 08:54:00 +00:00
SamSamskies commented 2023-04-20 20:05:15 +00:00 (Migrated from github.com)

@v0l fixed the logic to work for all nip-19 types and added unit tests.

@v0l fixed the logic to work for all nip-19 types and added unit tests.
v0l (Migrated from github.com) approved these changes 2023-04-20 20:49:39 +00:00
Sign in to join this conversation.
No description provided.