Skip to content
Snippets Groups Projects
Commit 02efe321 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Decode values used in URI's

parent 487cef15
No related branches found
No related tags found
No related merge requests found
...@@ -122,10 +122,12 @@ sub parseURIQuery ...@@ -122,10 +122,12 @@ sub parseURIQuery
# Loop with the components in sets of name & value # Loop with the components in sets of name & value
while (@components) { while (@components) {
my ($name,$value) = (shift(@components),shift(@components)); my ($name,$value) = (shift(@components),shift(@components));
# Unescape name value pair
# Store values and the last value we go $name =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
push(@{$res{$name}->{'values'}},$value); $value =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
# Add to hash
$res{$name}->{'value'} = $value; $res{$name}->{'value'} = $value;
push(@{$res{$name}->{'values'}},$value);
} }
return \%res; return \%res;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment