passing "%20" in a url to Perl via CGI
Ian Goldberg
linux-cOjNTMaGA5U at public.gmane.org
Thu Aug 5 19:57:06 UTC 2004
On Thu, Aug 05, 2004 at 03:53:51PM -0400, Madison Kelly wrote:
> Hi all,
>
> I've got an odd problem... I am trying to pass file and directory
> names over a link by using (as an example):
>
> http://192.168.1.99/cgi-bin/show-dirs.cgi?file_name=on-screen%20ping%20pong[1]
>
> Where the file name is in fact:
>
> on-screen%20ping%20pong[1]
If you have a literal "%" in the string you want submitted in a URL, you
need to escape it as "%25" [in the same way as a space is escaped as
"%20".] So your URL should be:
...?filename=on-screen%2520ping%2520pong[1]
- Ian
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list