Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] escape characters in a cgi parameter
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] escape characters in a cgi parameter
On Thu, Sep 11, 2003 at 06:53:16PM +0200, wrote:
>   Hi list.
>   I?m using the CGI library in order to receive arguments in a CGI 
> application. I use the function "parse_arguments" for parse the CGI 
> arguments. 
>   My problem is; when I receive the cgi parameters, if one of the 
> parameters include one of this characters: = or & the function 
> parse_arguments returns one exception. I must escape the characters = 
> and &, but how can I do that? Anybody knows how to escape characters 
> in a cgi parameter? 

Yes, you should certainly escape these characters, and more. Look on
Google for information about "percent escaping" and "url escaping".

BTW have you tried using mod_caml for your scripts?


Richard Jones.
Merjis Ltd. - all your business data are belong to you.
PTHRLIB is a library for writing small, efficient and fast servers in C.
HTTP, CGI, DBI, lightweight threads:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: