mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-14 16:38:39 +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,24 +196,24 @@ 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) {
|
||||||
if (e.tagName.toLowerCase() !== 'form') {
|
return '';
|
||||||
return e.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
let value = '';
|
|
||||||
const form = (new FormView(e.id)).getData();
|
|
||||||
|
|
||||||
for (let pair of form.entries()) {
|
|
||||||
value += '&' + pair[0] + '=' + pair[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
if (e.tagName.toLowerCase() !== 'form') {
|
||||||
|
return e.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
let value = '';
|
||||||
|
const form = (new FormView(e.id)).getData();
|
||||||
|
|
||||||
|
for (let pair of form.entries()) {
|
||||||
|
value += '&' + pair[0] + '=' + pair[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
} else if (match.indexOf('?') === 0) {
|
} else if (match.indexOf('?') === 0) {
|
||||||
returnHttpUri.getUriQueryParameter(current.query, match.substr(1));
|
return HttpUri.getUriQueryParameter(current.query, match.substr(1));
|
||||||
} else if (match.indexOf('/') === 0) {
|
} else if (match.indexOf('/') === 0) {
|
||||||
return 'ERROR PATH';
|
return 'ERROR PATH';
|
||||||
} else if (match === '%') {
|
} else if (match === '%') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user