git.shiar.nl
/
perl
/
plp
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tiny speedup decoding + in DecodeURI()
[perl/plp/.git]
/
PLP
/
Functions.pm
diff --git
a/PLP/Functions.pm
b/PLP/Functions.pm
index fe1f39c145d22bf5034f9135f51d7acd1caccaaa..3eb07cacef913d6080d49eb81ca3aa5586e6fbde 100644
(file)
--- a/
PLP/Functions.pm
+++ b/
PLP/Functions.pm
@@
-52,8
+52,8
@@
sub DecodeURI (@) {
my $ref = defined wantarray ? [@_] : \@_;
for (@$ref) {
eval {
my $ref = defined wantarray ? [@_] : \@_;
for (@$ref) {
eval {
-
s/\+/%20/g; # Browsers do y/ /+/ - I don't care about RFC'
s, but
-
# I do care about real-life situations.
+
tr/+/ /; # Browsers do tr/ /+/ - I don't care about RFC
s, but
+ # I do care about real-life situations.
s/%([0-9A-Fa-f][0-9A-Fa-f])/chr hex $1/ge;
};
}
s/%([0-9A-Fa-f][0-9A-Fa-f])/chr hex $1/ge;
};
}