From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA02600; Thu, 11 Sep 2003 19:43:15 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA30173 for ; Thu, 11 Sep 2003 19:43:14 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h8BHhDf03573 for ; Thu, 11 Sep 2003 19:43:13 +0200 (MET DST) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 19xVTC-0007RC-00; Thu, 11 Sep 2003 18:43:02 +0100 Date: Thu, 11 Sep 2003 18:43:02 +0100 To: amata@tsc.uc3m.es Cc: caml-list@inria.fr Subject: Re: [Caml-list] escape characters in a cgi parameter Message-ID: <20030911174302.GC27415@redhat.com> References: <7ec246d8.46d87ec2@tsc.uc3m.es> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7ec246d8.46d87ec2@tsc.uc3m.es> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 freshmeat:01 dbi:99 threads:01 ltd:98 caml:01 caml:01 0200,:01 sep:01 exception:02 receive:97 receive:97 business:96 wrote:03 library:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Sep 11, 2003 at 06:53:16PM +0200, amata@tsc.uc3m.es 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? (http://merjis.com/developers/mod_caml/) Rich. -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - 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: http://www.annexia.org/freeware/pthrlib/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners