mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: escape on resource filename (#1892)
add escape on resource filename
This commit is contained in:
@ -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)}`;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user