Skip to content

Commit

Permalink
encode icon urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Percslol committed Mar 16, 2024
1 parent 9a45a1a commit 3b7f21c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/libstore.lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class StoreRepo {
if (!app) {
throw new Error("App not found");
}
let thumb = URL.createObjectURL(await (await this.client.fetch(app.baseUrl + app.icon)).blob());
let thumb = URL.createObjectURL(await (await this.client.fetch(encodeURI(app.baseUrl + app.icon))).blob());
this.thumbCache.apps[appName] = thumb;
return thumb;
}
Expand All @@ -141,7 +141,7 @@ export class StoreRepo {
if (!lib) {
throw new Error("Lib not found");
}
let thumb = URL.createObjectURL(await (await this.client.fetch(lib.baseUrl + lib.icon)).blob());
let thumb = URL.createObjectURL(await (await this.client.fetch(encodeURI(lib.baseUrl + lib.icon))).blob());
this.thumbCache.libs[libName] = thumb;
return thumb;
}
Expand Down Expand Up @@ -357,7 +357,7 @@ export class StoreRepoLegacy {
if (!app) {
throw new Error("App not found");
}
let thumb = URL.createObjectURL(await (await this.client.fetch(this.baseUrl + app.icon)).blob());
let thumb = URL.createObjectURL(await (await this.client.fetch(encodeURI(this.baseUrl + app.icon))).blob());
this.thumbCache.apps[appName] = thumb;
return thumb;
}
Expand All @@ -370,7 +370,7 @@ export class StoreRepoLegacy {
if (!lib) {
throw new Error("Lib not found");
}
let thumb = URL.createObjectURL(await (await this.client.fetch(this.baseUrl + lib.icon)).blob());
let thumb = URL.createObjectURL(await (await this.client.fetch(encodeURI(this.baseUrl + lib.icon))).blob());
this.thumbCache.libs[libName] = thumb;
return thumb;
}
Expand Down

0 comments on commit 3b7f21c

Please sign in to comment.