diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-07-13 18:11:54 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-07-13 18:11:54 +0900 |
| commit | ad970dffdabb7b81ee18583c86898f48df0b4302 (patch) | |
| tree | b5b1e7a40c377369a4dd364b1f86a99462a469a4 /packages/client/src/scripts/safe-uri-decode.ts | |
| parent | :art: (diff) | |
| download | sharkey-ad970dffdabb7b81ee18583c86898f48df0b4302.tar.gz sharkey-ad970dffdabb7b81ee18583c86898f48df0b4302.tar.bz2 sharkey-ad970dffdabb7b81ee18583c86898f48df0b4302.zip | |
fix(client): fix url encoded string handling of nirax
Fix #8878
Diffstat (limited to 'packages/client/src/scripts/safe-uri-decode.ts')
| -rw-r--r-- | packages/client/src/scripts/safe-uri-decode.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/client/src/scripts/safe-uri-decode.ts b/packages/client/src/scripts/safe-uri-decode.ts new file mode 100644 index 0000000000..301b56d7fd --- /dev/null +++ b/packages/client/src/scripts/safe-uri-decode.ts @@ -0,0 +1,7 @@ +export function safeURIDecode(str: string): string { + try { + return decodeURIComponent(str); + } catch { + return str; + } +} |