diff --git a/frontend/src/api/pub.js b/frontend/src/api/pub.js index bf42438c..2a65902a 100644 --- a/frontend/src/api/pub.js +++ b/frontend/src/api/pub.js @@ -3,9 +3,11 @@ import { baseURL } from "@/utils/constants"; export async function fetch(url, password = "") { url = removePrefix(url); + let deiso = new TextDecoder("iso88591"); + let enutf8 = new TextEncoder(); const res = await fetchURL(`/api/public/share${url}`, { - headers: { "X-SHARE-PASSWORD": unescape(encodeURIComponent(password)) }, + headers: { "X-SHARE-PASSWORD": deiso.decode(enutf8.encode(password)) }, }); if (res.status === 200) {