git.shiar.nl
/
perl
/
plp
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abb75f2
)
tiny speedup decoding + in DecodeURI()
author
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 31 Mar 2007 02:08:21 +0000
(
04:08
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 31 Mar 2007 02:08:21 +0000
(
04:08
+0200)
PLP/Functions.pm
patch
|
blob
|
history
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 {
-
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;
};
}