Skip to content

Commit b6618dd

Browse files
authored
Fix issue #1924, require nostr prefixes start with slash (#1928)
1 parent 33db3b2 commit b6618dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/url.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export function parseEmbedUrl (href) {
9393
const { hostname, pathname, searchParams } = new URL(href)
9494

9595
// nostr prefixes: [npub1, nevent1, nprofile1, note1]
96-
const nostr = href.match(/(?<id>(?<type>npub1|nevent1|nprofile1|note1|naddr1)[02-9ac-hj-np-z]+)/)
96+
const nostr = href.match(/\/(?<id>(?<type>npub1|nevent1|nprofile1|note1|naddr1)[02-9ac-hj-np-z]+)/)
9797
if (nostr?.groups?.id) {
9898
let id = nostr.groups.id
9999
if (nostr.groups.type === 'npub1') {

0 commit comments

Comments
 (0)