escape mechanisms
hi,
i'm tweaking coppermine photo gallery to try to prevent some comment spam.
there's a "bad words" function, an array variable something like this:
$lang_bad_words = array('*bad1*', 'bad2', 'Fu\(*', .... etc.. )
I'm wanting to use this replace function to nuke HTTP references, I got the
"http" parts out, but I'm not having any luck nuking the double-fwd.slash &
colon that form part of URL's.
I tried this as part of the above array: '*\/\/'
ie, wild-card-escape-fwd-slash-escape-fwd-slash
is this even close?
thanks from an HTML'er to my PHP brothers ...
Re: escape mechanisms
On Thu, 12 Jul 2007 02:21:25 +0200, Tangent Spider <goo [at] gook.com> wrote:=
> hi,
>
> i'm tweaking coppermine photo gallery to try to prevent some comment =
> spam.
>
> there's a "bad words" function, an array variable something like this:=
>
> $lang_bad_words =3D array('*bad1*', 'bad2', 'Fu\(*', .... etc.. )
>
> I'm wanting to use this replace function to nuke HTTP references, I go=
t =
> the
> "http" parts out, but I'm not having any luck nuking the =
> double-fwd.slash &
> colon that form part of URL's.
>
> I tried this as part of the above array: '*\/\/'
>
> ie, wild-card-escape-fwd-slash-escape-fwd-slash
>
> is this even close?
What mechanism are you actually using with this array? The syntax is =
entirely dependant on that.
-- =
Rik Wasmus
Re: escape mechanisms
"Rik" <luiheidsgoeroe [at] hotmail.com> wrote in message
news:op.tvl6eq0tqnv3q9 [at] metallium...
On Thu, 12 Jul 2007 02:21:25 +0200, Tangent Spider <goo [at] gook.com> wrote:
> hi,
>
> i'm tweaking coppermine photo gallery to try to prevent some comment
> spam.
>
> there's a "bad words" function, an array variable something like this:
>
> $lang_bad_words = array('*bad1*', 'bad2', 'Fu\(*', .... etc.. )
>
> I'm wanting to use this replace function to nuke HTTP references, I got
> the
> "http" parts out, but I'm not having any luck nuking the
> double-fwd.slash &
> colon that form part of URL's.
>
> I tried this as part of the above array: '*\/\/'
>
> ie, wild-card-escape-fwd-slash-escape-fwd-slash
>
> is this even close?
What mechanism are you actually using with this array? The syntax is
entirely dependant on that.
--
Rik Wasmus
Rik: not sure what you mean by "mechanism". Coppermine replaces any items
in the array found in parsed comment input from visitors with something
innocuous like asterisks. I seemed to have solved the problem by using the
"wildcard" (asterisk) in the array object, like this: 'http*' and it nukes
the two fwd-slashes as part of the wild-card designation. good enough.