Fix sitemap explore URL not being URI encoded
This commit is contained in:
parent
a3d9e466a5
commit
36909c5d66
|
|
@ -7,7 +7,7 @@ export default defineSitemapEventHandler(() => {
|
|||
const pages = db.select({ path: explorerContentTable.path, lastMod: explorerContentTable.timestamp, navigable: explorerContentTable.navigable, private: explorerContentTable.private }).from(explorerContentTable).all();
|
||||
|
||||
return pages.filter(e => e.navigable && !e.private && e.path.split('/').map((_, i, a) => a.slice(0, i).join('/')).every(p => !pages.find(_p => _p.path === p)?.private)).map(e => ({
|
||||
loc: `/explore/${e.path}`,
|
||||
loc: `/explore/${encodeURIComponent(e.path)}`,
|
||||
lastmod: e.lastMod,
|
||||
})) satisfies SitemapUrlInput[];
|
||||
})
|
||||
Loading…
Reference in New Issue