mirror of
https://github.com/usememos/memos.git
synced 2024-12-18 16:41:44 +03:00
fix: escape on resource filename (#1892)
add escape on resource filename
This commit is contained in:
parent
5b6c98582e
commit
1c07ae2650
@ -3,5 +3,5 @@ export const getResourceUrl = (resource: Resource, withOrigin = true) => {
|
||||
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…
Reference in New Issue
Block a user