[ic] Processing Perl with mv_click
Stefan Hornburg
interchange-users@icdevgroup.org
Wed Mar 12 11:41:01 2003
On Wed, 12 Mar 2003 17:23:03 +0100
"Greg Goble" <ggoble@rpo.at> wrote:
> Hi folks,
>
> RH7.3
> IC4.8.5
>
> I'm trying to filter the singe quote ' and convert it into an acsent ´
> though the comments box on my order form, so that the single quote in the
> comments box of my sql doesn't interfere with some onmouseover="retun
> overlib('[sql-param comments]')...that I'm using.
>
> If you notice the single quote, if used in the comments field, will cause an
> error, therefore, I wish to replace it on the submission. I was told that
> perl would do the trick on an mv_click, so I gave it a go with perl and got
> it to work.
This are instructions for 4.8.
Define the filter in catalog.cfg:
Sub <<EOS
sub dummy {};
$Filter{myquote} = sub {
$comments = shift;
$comments =~ s/'/´/g;
$comments;
};
EOS
Apply it on your page:
[sql-filter myquote][sql-param comments][/sql-filter]
Ciao
Racke