diff options
author | Alex Shnitman <alexta69@gmail.com> | 2022-01-14 09:11:03 +0200 |
---|---|---|
committer | Alex Shnitman <alexta69@gmail.com> | 2022-01-14 09:11:03 +0200 |
commit | 622ca428e3b38084a35f43552b0fb504416078a7 (patch) | |
tree | 88b359fa4c4bad163a1c387fcd61e19572ef9593 /ui/src/app/downloads.pipe.ts | |
parent | Merge pull request #99 from Erazor2/RealRetry (diff) | |
download | metube-622ca428e3b38084a35f43552b0fb504416078a7.tar.gz metube-622ca428e3b38084a35f43552b0fb504416078a7.tar.bz2 metube-622ca428e3b38084a35f43552b0fb504416078a7.zip |
encode download links (closes #104)
Diffstat (limited to 'ui/src/app/downloads.pipe.ts')
-rw-r--r-- | ui/src/app/downloads.pipe.ts | 9 |
1 files changed, 9 insertions, 0 deletions
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); + } +} |