[ic] Apexes, inverted commas problem

Marco Mescoli m.mescoli at omnibit.nu
Tue Nov 25 14:50:29 EST 2003


Single-Quote, Double-Quote, Apex, Apexes, inverted commas ...
Sorry  ... I put my dictionary in the garbage
and now i will study english language instead IC tags ;-)
Thanks for the helps from mailing list

Marco

----- Original Message -----
From: "Mike Heins" <mike at perusion.com>
To: <interchange-users at icdevgroup.org>
Sent: Monday, November 24, 2003 7:30 PM
Subject: Re: [ic] Apexes, inverted commas problem


> Quoting Marco Mescoli (m.mescoli at omnibit.nu):
> > Old and same problem: apexes inside a cgi parameter that give error in
an
> > insert SQL query.
> > Is there a IC tag that insert a slash '\' before apexes in a string ?
> > An other idea to solve this ?
>
> If I knew what an apex was, I could tell you. 8-) I don't know of any
> character that causes a problem except a single-quote, so I will
> assume that is what you mean.
>
> [cgi name=yourparam filter=sql keep=1]
>
> Remove the keep=1 if you want the value to be permanently changed
> to the filtered version.
>
> By the way, backslash does not escape for most SQL implementations;
> you double the single-quote (apex?) character.
>
> > I dig mailing list archive without results.
> >
>
> Hmm. You must not have searched on "filter".
>
> You can add filters to IC to filter anything -- there should
> be many examples of how to make one.
>
> CodeDef remove_apex Filter
> CodeDef remove_apex Routine <<EOR
> sub {
> my $value = shift;
> my $apex = "?";
> $value =~ s/$apex/\\$apex/g;
> return $value;
> }
> EOR
>
> If that goes in catalog.cfg, then
>
>     [cgi name=yourparam filter=remove_apex keep=1]
>
> will provide the filtered value. This is a faster version
> of:
>
>     [filter op=remove_apex interpolate=1][cgi yourparam][/filter]
>
> --
> Mike Heins
> Perusion -- Expert Interchange Consulting    http://www.perusion.com/
> phone +1.765.647.1295      <mike at perusion.com>
>
> If you like what you're gettin', keep doin' what you're doin'. -- Hector
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users



More information about the interchange-users mailing list