Skip to content

Commit 95a07e9

Browse files
authored
Update url-utils.ts
1 parent 1229e16 commit 95a07e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/url-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function getPostUrlBySlug(slug: string): string {
1515

1616
export function getCategoryUrl(category: string): string {
1717
if (category === '未分类') return url('/archive/category/uncategorized/')
18-
return url(`/archive/category/${category}/`)
18+
return url(`/archive/category/${encodeURIComponent(category)}/`);
1919
}
2020

2121
export function getDir(path: string): string {

0 commit comments

Comments
 (0)