From b76b015b41c31d18044c5f95b4416329ba1507db Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 31 Mar 2007 04:08:21 +0200 Subject: [PATCH] tiny speedup decoding + in DecodeURI() --- PLP/Functions.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PLP/Functions.pm b/PLP/Functions.pm index fe1f39c..3eb07ca 100644 --- 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 RFCs, but + # I do care about real-life situations. s/%([0-9A-Fa-f][0-9A-Fa-f])/chr hex $1/ge; }; } -- 2.30.0