Unverified Commit 4de65ab5 authored by boojack's avatar boojack Committed by GitHub

fix: url encode for tag name (#1031)

parent 771ef44d
......@@ -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)}`;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment