fix: escape on resource filename (#1892)

add escape on resource filename
pull/1895/head
Athurg Gooth 2 years ago committed by GitHub
parent 5b6c98582e
commit 1c07ae2650
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,5 +3,5 @@ export const getResourceUrl = (resource: Resource, withOrigin = true) => {
return resource.externalLink; return resource.externalLink;
} }
return `${withOrigin ? window.location.origin : ""}/o/r/${resource.id}/${resource.publicId}/${resource.filename}`; return `${withOrigin ? window.location.origin : ""}/o/r/${resource.id}/${resource.publicId}/${encodeURIComponent(resource.filename)}`;
}; };

Loading…
Cancel
Save