mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-14 01:51:22 +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++) {
|
||||
let input = $(inputs[i]);
|
||||
let name = input.attr("name");
|
||||
let value = input.val();
|
||||
let value = input.val().trim();
|
||||
if (!value) {
|
||||
continue;
|
||||
}
|
||||
@ -17,6 +17,9 @@
|
||||
} else {
|
||||
url += "&";
|
||||
}
|
||||
if (value.startsWith(`${name}=`)) {
|
||||
value = value.substr(name.length + 1);
|
||||
}
|
||||
url += `${name}=${value}`;
|
||||
}
|
||||
$("#queryparam_url").val(url);
|
||||
|
Loading…
Reference in New Issue
Block a user