mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
TSK-851 Short link URI encoded should resolve (#2751)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
0972048655
commit
0688a4dd23
@ -56,7 +56,7 @@ function parseQuery (query: string): Record<string, string | null> {
|
|||||||
if (query.length === 0 || !query.startsWith('?')) {
|
if (query.length === 0 || !query.startsWith('?')) {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
query = query.substring(1)
|
query = decodeURIComponent(query).substring(1)
|
||||||
const vars = query.split('&')
|
const vars = query.split('&')
|
||||||
const result: Record<string, string | null> = {}
|
const result: Record<string, string | null> = {}
|
||||||
for (let i = 0; i < vars.length; i++) {
|
for (let i = 0; i < vars.length; i++) {
|
||||||
@ -91,9 +91,9 @@ function parsePath (path: string): string[] {
|
|||||||
|
|
||||||
function parseHash (hash: string): string {
|
function parseHash (hash: string): string {
|
||||||
if (hash.startsWith('#')) {
|
if (hash.startsWith('#')) {
|
||||||
return hash.substring(1)
|
return decodeURIComponent(hash.substring(1))
|
||||||
}
|
}
|
||||||
return hash
|
return decodeURIComponent(hash)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user