FU::Util::query_decode(): Properly handle empty "&"-parts
This commit is contained in:
parent
0cd947c545
commit
5f8809d052
2 changed files with 3 additions and 0 deletions
|
|
@ -41,6 +41,7 @@ sub uri_unescape :prototype($) ($s) {
|
|||
sub query_decode :prototype($) ($s) {
|
||||
my %o;
|
||||
for (split /&/, $s//'') {
|
||||
next if !length;
|
||||
my($k,$v) = map uri_unescape($_), split /=/, $_, 2;
|
||||
$v //= builtin::true;
|
||||
if (ref $o{$k}) { push $o{$k}->@*, $v }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue