mirror of
https://github.com/usememos/memos.git
synced 2025-03-24 06:30:09 +01:00
fix: url encode for tag name (#1031)
This commit is contained in:
parent
771ef44d82
commit
4de65ab55d
@ -202,7 +202,7 @@ export function upsertTag(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() {
|
||||
|
@ -2,5 +2,5 @@ export const getResourceUrl = (resource: Resource, withOrigin = true) => {
|
||||
if (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)}`;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user