From 01b75c67c2e67525c5d16c5bd942aaa8d42d251d Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 23 Sep 2002 12:41:32 +0000 Subject: [PATCH] Better avoid the brain-dead encoding " " as "+" when generating URL's. --- lib/perl/CGI.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/perl/CGI.pm b/lib/perl/CGI.pm index 462b0c43..024a1451 100644 --- a/lib/perl/CGI.pm +++ b/lib/perl/CGI.pm @@ -23,8 +23,7 @@ BEGIN { sub url_escape($) { my $x = shift @_; - $x =~ s/([^-\$_.!*'(),0-9A-Za-z\x80-\xff ])/"%".unpack('H2',$1)/ge; - $x =~ s/ /+/g; + $x =~ s/([^-\$_.!*'(),0-9A-Za-z\x80-\xff])/"%".unpack('H2',$1)/ge; return $x; } -- 2.39.2