fix: url encode for tag name (#1031)

This commit is contained in:
boojack
2023-02-06 20:28:19 +08:00
committed by GitHub
parent 771ef44d82
commit 4de65ab55d
2 changed files with 2 additions and 2 deletions

View File

@ -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)}`;
};