forked from 0x2620/pandora
fix query parser
This commit is contained in:
parent
6cb65d131c
commit
8079671cf1
1 changed files with 5 additions and 4 deletions
|
@ -244,10 +244,11 @@ Ox.load('UI', {
|
||||||
vars.forEach(function(v) {
|
vars.forEach(function(v) {
|
||||||
var kv = v.split('='), k = kv[0], v = kv[1];
|
var kv = v.split('='), k = kv[0], v = kv[1];
|
||||||
query[k] = decodeURIComponent(v);
|
query[k] = decodeURIComponent(v);
|
||||||
query[k] = {
|
if (query[k] == 'true') {
|
||||||
'true': true, 'false': false
|
query[k] = true;
|
||||||
}[query[k]] || query[k];
|
} else if (query[k] == 'false') {
|
||||||
if (query[k].match(/^[\d\.]+$/)) {
|
query[k] = false;
|
||||||
|
} else if (query[k].match(/^[\d\.]+$/)) {
|
||||||
query[k] = parseFloat(query[k]);
|
query[k] = parseFloat(query[k]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue