a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

uri encode pub names

+2 -2
+1 -1
app/lish/createPub/getPublicationURL.ts
··· 21 21 }) { 22 22 let record = pub.record as PubLeafletPublication.Record; 23 23 let aturi = new AtUri(pub.uri); 24 - return `/lish/${aturi.host}/${record?.name || pub.name}`; 24 + return `/lish/${aturi.host}/${encodeURIComponent(record?.name || pub.name)}`; 25 25 }
+1 -1
middleware.ts
··· 51 51 let aturi = new AtUri(pub?.uri); 52 52 return NextResponse.rewrite( 53 53 new URL( 54 - `/lish/${aturi.host}/${pub.name}${req.nextUrl.pathname}`, 54 + `/lish/${aturi.host}/${encodeURIComponent(pub.name)}${req.nextUrl.pathname}`, 55 55 req.url, 56 56 ), 57 57 );