fixed invalid post title breaking links
This commit is contained in:
@@ -51,7 +51,7 @@ export const GET: APIRoute = async ({ site }) => {
|
||||
const items = posts
|
||||
.filter(p => !p.draft)
|
||||
.map(p => {
|
||||
const url = `${origin}/posts/${p.slug}`;
|
||||
const url = `${origin}/posts/${encodeURIComponent(p.slug)}`;
|
||||
const description = p.summary || p.excerpt || '';
|
||||
const pubDate = new Date(p.date).toUTCString();
|
||||
const categories = p.tags.map(t => ` <category>${escapeXml(t)}</category>`).join('\n');
|
||||
|
||||
Reference in New Issue
Block a user