{{ getFilename(attachment.url) }}
{{ @@ -60,7 +60,9 @@ const getFilename = (url: string) => { if (url.includes("/media/proxy")) { // Decode last part of URL as base64url, which is the real URL const realUrl = atob(url.split("/").pop() ?? ""); - return realUrl.substring(realUrl.lastIndexOf("/") + 1); + return decodeURIComponent( + realUrl.substring(realUrl.lastIndexOf("/") + 1), + ); } const path = new URL(url).pathname; return path.substring(path.lastIndexOf("/") + 1); diff --git a/components/social-elements/notes/note.vue b/components/social-elements/notes/note.vue index 5ca530a..02c60ae 100644 --- a/components/social-elements/notes/note.vue +++ b/components/social-elements/notes/note.vue @@ -12,33 +12,35 @@ reblogged