On Friday, April 12, 2002, at 07:15 , Kris G Findlay wrote:

> ok exact problem !!
>
> Example data inputed via form :
> 'here is a quote  "this Quote".'     # which is passes to variable 
> $document
>
> if i use hidden fields in a html form to store these variables while the
> page displays a preview
> eg  print "<input type=\"hidden\" name=\"hiddenField\" value=\"$document\
> ">"
>
> the html page returned displays corectly and all data is in source
> eg  <input type="hidden" name="hiddenField" value="here is a quote  "this
> Quote".">"
> but when form is submited to cgi the data after the extra quote mark is
> missing

[..]

$hiddenField = param('hiddenField');

$hiddenField =~ s/\"/\\\"/g; # \\ - insert \ and \" guard my "

$document = $hiddenField ;

hence your print would now output:

<input type="hidden" name="hiddenField" value="here is a quote  \"this 
Quote\".">

which I think would work ....
And would retain the "this Quote" in the hidden field - as a CGI
but would also need to be 'deconstructed upon return....


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to