From: Martin Mares Date: Mon, 23 Sep 2002 12:41:32 +0000 (+0000) Subject: Better avoid the brain-dead encoding " " as "+" when generating URL's. X-Git-Tag: holmes-import~1341 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=01b75c67c2e67525c5d16c5bd942aaa8d42d251d;p=libucw.git Better avoid the brain-dead encoding " " as "+" when generating URL's. --- 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; }