[pmwiki-users] How to protect PMForm against spam?

Roman romat2 at gmail.com
Mon Mar 3 09:01:47 CST 2008

On Mon, Mar 3, 2008 at 3:15 PM, Patrick R. Michaud <pmichaud at pobox.com>

> On Mon, Mar 03, 2008 at 11:46:53AM +0100, Roman wrote:
> >    I don't want to use captcha, I want to ignore entries containg
> strings
> >    used by spammers, particularly "<a href=" and "[url=". Perhaps
> "match" or
> >    "if" parameters of (:template:) directive could solve it but I
> haven't
> >    found proper syntax. Has anyone been successful with this?
> Try
>    (:template require <field> match=-"[url=" :)
> where <field> is the input form field you want to check for "[url=".
-"[url=" as a value of match parameter produces warning: "preg_match():
Compilation failed: missing terminating ] for character class at offset 10
in pmform.php on line 98"

After several attempts I found this:
1. It looks that match parameter does not match substring but entire content
of input field. The following works but only if href is the only text in

 (:template require <field> match=-href :)

2. Match does not accept quotes.

 (:template require <field> match=-"href" :) does not work even if href is
the only text of <field>.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080303/a8010645/attachment.html 

More information about the pmwiki-users mailing list