[pmwiki-users] pmform input filtering
blues
blues4u at supereva.it
Thu Sep 13 08:13:40 CDT 2007
On Thu, 13 Sep 2007 16:02:50 +0300, Patrick R. Michaud
<pmichaud at pobox.com> wrote:
> On Thu, Sep 13, 2007 at 01:04:40PM +0300, blues wrote:
>>
>> is there a way to filter input from a pmform form?
>> what i want to do is avoid users to input some markup
>> and especially directives from inside a comment box.
>
> PmForm already blocks directives from data being saved to
> pages by converting markups: thus "(:" becomes "( :"
> and ":)" becomes ": )". These are managed by the
> $PmFormPostPatterns array.
>
> The (:template require:) directive can be used to
> prevent certain string combinations from appearing in
> posted fields. For example, to prevent someone from
> entering link markups, use:
>
> (:template require text match=-[[ errmsg="links not allowed":)
>
> which says that the 'text' field must not contain "[[".
>
thanks for the explanation, i'll give a look to how
the $PmFormPostPatterns works.
also the (:template require:) looks very powerful.
blues
More information about the pmwiki-users
mailing list