mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 06:27:03 +01:00
Strip off leading query parameter input values to prevent confusion
This commit is contained in:
parent
d5e034a880
commit
f820033a8f
@ -8,7 +8,7 @@
|
|||||||
for (let i = 0; i < inputs.length; i++) {
|
for (let i = 0; i < inputs.length; i++) {
|
||||||
let input = $(inputs[i]);
|
let input = $(inputs[i]);
|
||||||
let name = input.attr("name");
|
let name = input.attr("name");
|
||||||
let value = input.val();
|
let value = input.val().trim();
|
||||||
if (!value) {
|
if (!value) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -17,6 +17,9 @@
|
|||||||
} else {
|
} else {
|
||||||
url += "&";
|
url += "&";
|
||||||
}
|
}
|
||||||
|
if (value.startsWith(`${name}=`)) {
|
||||||
|
value = value.substr(name.length + 1);
|
||||||
|
}
|
||||||
url += `${name}=${value}`;
|
url += `${name}=${value}`;
|
||||||
}
|
}
|
||||||
$("#queryparam_url").val(url);
|
$("#queryparam_url").val(url);
|
||||||
|
Loading…
Reference in New Issue
Block a user