From 622ca428e3b38084a35f43552b0fb504416078a7 Mon Sep 17 00:00:00 2001 From: Alex Shnitman Date: Fri, 14 Jan 2022 09:11:03 +0200 Subject: encode download links (closes #104) --- ui/src/app/downloads.pipe.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ui/src/app/downloads.pipe.ts') diff --git a/ui/src/app/downloads.pipe.ts b/ui/src/app/downloads.pipe.ts index d4a1654..cb3bf92 100644 --- a/ui/src/app/downloads.pipe.ts +++ b/ui/src/app/downloads.pipe.ts @@ -35,3 +35,12 @@ export class SpeedPipe implements PipeTransform { return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; } } + +@Pipe({ + name: 'encodeURIComponent' +}) +export class EncodeURIComponent implements PipeTransform { + transform(value: string, ...args: any[]): any { + return encodeURIComponent(value); + } +} -- cgit