MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Trouble with fetching cgi-string and double Qoute!



Hi Jojo -

> Your hint canīt solve my trouble. I have try it before and i am not able
> to solve it, because i use the cgi-fetching-string-query by miniving.
> 
> [perl arg="cgi scratch"]
> for ($i = 1; $i < 10; $i++)
>     {
>      if ($Safe{'cgi'}->{"no$i"})
>         {
>          $Safe{'scratch'}->{"no$i"}  = $Safe{'cgi'}->{"no$i"};
>          $_ = $Safe{'cgi'}->{"otitle$i"};
>          s/\"\"/\"/;
>          $Safe{'scratch'}->{"title$i"} = $_;
>          }
>      }
> "";
> [/perl]

By the time you get to this perl code, it is already too late.  The HTML
for the form is bad, not the code handling the form input later.

The example you gave before showed HTML that looked something like:

 <input type="hidden" name="otitle7" value=""quoted text" - more">
        ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^
The web browser sees this as:
  type="hidden"
  name="otitle7"
  value=""

and ignores the rest:
  quoted text" - more"

The web browser thinks the value of otitle7 is empty, and that is what it
sends to MiniVend when the form is submitted.  If the HTML code is fixed
so that the quotes are replaced with %22 like so: 

 <input type="hidden" name="otitle7" value="%22quoted text%22 - more">
        ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Then the web browser will see:
  type="hidden"
  name="otitle7"
  value="%22quoted text%22 - more"

so the entire title will get sent to MiniVend when the form is submitted.


Larry Leszczynski
larryl@furph.com
--
  furph, Inc.	WWW/Unix/Windows Solutions	734-513-7763 (voice)
info@furph.com	   http://www.furph.com		734-513-7759 (FAX)





Search for: Match: Format: Sort by: