TSK-851 Short link URI encoded should resolve (#2751)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-03-16 17:36:05 +06:00 committed by GitHub
parent 0972048655
commit 0688a4dd23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ function parseQuery (query: string): Record<string, string | null> {
if (query.length === 0 || !query.startsWith('?')) {
return {}
}
query = query.substring(1)
query = decodeURIComponent(query).substring(1)
const vars = query.split('&')
const result: Record<string, string | null> = {}
for (let i = 0; i < vars.length; i++) {
@ -91,9 +91,9 @@ function parsePath (path: string): string[] {
function parseHash (hash: string): string {
if (hash.startsWith('#')) {
return hash.substring(1)
return decodeURIComponent(hash.substring(1))
}
return hash
return decodeURIComponent(hash)
}
// ------------------------