Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix: URL decode tag names to allow accessing tags with spaces in their name

MohamedBassem42306591168d
diff --git a/packages/web/app/dashboard/tags/[tagName]/page.tsx b/packages/web/app/dashboard/tags/[tagName]/page.tsx
index 066315d0..fa3a1f8e 100644
--- a/packages/web/app/dashboard/tags/[tagName]/page.tsx
+++ b/packages/web/app/dashboard/tags/[tagName]/page.tsx
@@ -15,10 +15,11 @@ export default async function TagPage({
if (!session) {
redirect("/");
}
+ const tagName = decodeURIComponent(params.tagName);
const tag = await db.query.bookmarkTags.findFirst({
where: and(
eq(bookmarkTags.userId, session.user.id),
- eq(bookmarkTags.name, params.tagName),
+ eq(bookmarkTags.name, tagName),
),
columns: {
id: true,
@@ -46,7 +47,7 @@ export default async function TagPage({
return (
<div className="container flex flex-col gap-3">
- <span className="pt-4 text-2xl">{params.tagName}</span>
+ <span className="pt-4 text-2xl">{tagName}</span>
<hr />
<BookmarksGrid query={query} bookmarks={bookmarks.bookmarks} />
</div>