Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (43 sloc) 1.34 KB
__NAME__ purpose
specify variables and filters through which they should be run through automatically
__END__
__NAME__ see also
filter
__END__
__NAME__ synopsis
<arg choice='plain' rep='repeat'>
<replaceable>variable_name</replaceable>
<replaceable>filter_name</replaceable>
</arg>
__END__
__NAME__ description
The directive specifies one or more &glos-filter;s
that should automatically be applied to &glos-CGI;
&glos-variable;s.
</para><para>
That way, by the time you get to call &tag-cgi;, the
variable value is already filtered and ready for use.
__END__
__NAME__ example: Automatically filtering "mail_lists" variable
Some variables submitted by the user come back null-separated, such as
values from multi-select boxes where the selected items are separated
by null (<literal>\0</literal>) characters. To automatically change those
nulls to spaces, you could use this directive:
<programlisting><![CDATA[
Filter mail_lists null_to_space
]]></programlisting>
__END__
__NAME__ example: Applying multiple filters to a variable
<programlisting><![CDATA[
Filter firstname "lc ucfirst"
]]></programlisting>
__END__
__NAME__ notes
You could also use the &tag-filter; tag, but in the long
run the &conf-Filter; approach reduces typing and minimizes the chance
of omission.
__END__
__NAME__ missing
More examples
It filters only CGI vars, right?
__END__
Something went wrong with that request. Please try again.