mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-16 09:18:42 +00:00
fix query param encoding
This commit is contained in:
parent
f0d34f3dbd
commit
0179c6f8c0
|
|
@ -145,7 +145,7 @@ export class UriFactory
|
||||||
let pars = [];
|
let pars = [];
|
||||||
for (const a in comps) {
|
for (const a in comps) {
|
||||||
if (comps.hasOwnProperty(a) && comps[a] !== '' && comps[a] !== null) {
|
if (comps.hasOwnProperty(a) && comps[a] !== '' && comps[a] !== null) {
|
||||||
pars.push(a + '=' + comps[a]);
|
pars.push(a + '=' + encodeURIComponent(comps[a]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -196,7 +196,10 @@ export class UriFactory
|
||||||
} else if (match.indexOf('#') === 0) {
|
} else if (match.indexOf('#') === 0) {
|
||||||
const e = document.getElementById(match.substr(1));
|
const e = document.getElementById(match.substr(1));
|
||||||
|
|
||||||
if (e) {
|
if (!e) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
if (e.tagName.toLowerCase() !== 'form') {
|
if (e.tagName.toLowerCase() !== 'form') {
|
||||||
return e.value;
|
return e.value;
|
||||||
}
|
}
|
||||||
|
|
@ -209,9 +212,6 @@ export class UriFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
} else if (match.indexOf('?') === 0) {
|
} else if (match.indexOf('?') === 0) {
|
||||||
return HttpUri.getUriQueryParameter(current.query, match.substr(1));
|
return HttpUri.getUriQueryParameter(current.query, match.substr(1));
|
||||||
} else if (match.indexOf('/') === 0) {
|
} else if (match.indexOf('/') === 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user