But that's exactly what nobody wants, as the & of & is treated as parameter delimiter.
prints#!/usr/bin/perl -w use strict; use CGI; my $q = new CGI; print $q->header; print "<pre>\n"; print $_, "=", $q->param($_), "\n" for $q->param; print "\n</pre>\n";
forfoo=bar amp= baz=
but it should printhttp://electra.igd.fhg.de/cgi-bin/test3.pl?foo=bar&baz
You need to use CGI::escape or URI::Escape but not CGI::escapeHTML.foo=bar&baz
Update: Just for completeness: a() calls CGI::Util::make_attributes on each attribute, the latter calls CGI::Util::simple_escape for escaping ("&"->"&" and some others). CGI::Util::escape does something different (see my last post).
alex pleiner <alex@zeitform.de>
zeitform Internet Dienste
In reply to Re: Re: Re: CGI fails to urlencode & chars in outbound url's
by projekt21
in thread CGI fails to urlencode & chars in outbound url's
by BrowserUk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |