Skip to content

Commit

Permalink
properly encode document filename in url (#1744)
Browse files Browse the repository at this point in the history
  • Loading branch information
upsuper authored Feb 2, 2024
1 parent 45aff86 commit 5e07a47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/reports/documents/DocumentPreview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
export let filename: string;
$: extension = ext(filename).toLowerCase();
$: url = `${$base_url}document/?filename=${filename}`;
$: url = `${$base_url}document/?filename=${encodeURIComponent(filename)}`;
</script>

{#if extension === "pdf"}
Expand Down

0 comments on commit 5e07a47

Please sign in to comment.