mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: url encode for tag name (#1031)
This commit is contained in:
@ -202,7 +202,7 @@ export function upsertTag(tagName: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function deleteTag(tagName: string) {
|
export function deleteTag(tagName: string) {
|
||||||
return axios.delete<ResponseObject<string>>(`/api/tag/${encodeURI(tagName)}`);
|
return axios.delete<ResponseObject<string>>(`/api/tag/${encodeURIComponent(tagName)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getRepoStarCount() {
|
export async function getRepoStarCount() {
|
||||||
|
@ -2,5 +2,5 @@ export const getResourceUrl = (resource: Resource, withOrigin = true) => {
|
|||||||
if (resource.externalLink) {
|
if (resource.externalLink) {
|
||||||
return resource.externalLink;
|
return resource.externalLink;
|
||||||
}
|
}
|
||||||
return `${withOrigin ? window.location.origin : ""}/o/r/${resource.id}/${encodeURI(resource.filename)}`;
|
return `${withOrigin ? window.location.origin : ""}/o/r/${resource.id}/${encodeURIComponent(resource.filename)}`;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user