Filter
Attach an automatic filter to a variable.
Synopsis
|
Filter varname "filtername [filternames...]"
|
You can set filters for multiple variables at once
by using the Perl-style "here document" syntax,
as follows:
Filter <<EOF
varname1 filter1
varname2 "filter1 filter2"
EOF
|
Scope
This directive is only available for use in the local
(catalog.cfg) configuration file.
It will not affect any other website in any way.
This directive will not work in the global
(interchange.cfg) configuration file.
Description
This directive attaches one or more filters to a form value name.
The filters will be automatically applied, in sequence, whenever a
form is posted with the named variable.
Of course you could just as easily use the [filter] tag,
in one or more pages,
if the filter is only going to be used in a small number of places.
|
Note
If more than one filter is specified for a variable then the filter
list must be enclosed with quotes.
|
Example
As an example, multiple form variable submissions on the same page come
back NULL-separated ("value1\0value2\0value3").
To automatically change those NULLs to spaces, you could use the following:
|
Filter variable_name null_to_space
|
See also