Skip to content

Commit b2592fc

Browse files
committed
fix: fix handling of background url (@fehmer)
1 parent b9928f0 commit b2592fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/src/ts/controllers/theme-controller.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@ function applyCustomBackground(): void {
354354
$("#words").addClass("noErrorBorder");
355355
$("#resultWordsHistory").addClass("noErrorBorder");
356356
$(".customBackground").html(
357-
`<img src="${Config.customBackground}" alt="" onerror="javascript:window.dispatchEvent(new Event('customBackgroundFailed'))" />`
357+
`<img src="${encodeURI(
358+
Config.customBackground
359+
)}" alt="" onerror="javascript:window.dispatchEvent(new Event('customBackgroundFailed'))" />`
358360
);
359361
BackgroundFilter.apply();
360362
applyCustomBackgroundSize();

0 commit comments

Comments
 (0)