On Mon, Mar 3, 2008 at 3:15 PM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> 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 <field>. (: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>. Roman
_______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
