Interchange Reference Pages: Filters


For a complete introduction to Interchange filters, please see the filter glossary entry.

Table of Contents

acl2hash — convert Interchange ACL string to a Perl hash representation
alpha — eliminate non-alpha characters
alphanumeric — eliminate non-alphanumeric characters
backslash — eliminate backslashes
bold — enclose input in HTML <b> (bold) tag
cgi — expand to value of the CGI variable specified in body
checkbox — return user-supplied value if its length is 1 or more, an empty string otherwise
colons_to_null — replace double colons "::" with \0 (null) character
commify — add thousands separator to a number, and trim to specified number of decimal places
compress_space — eliminate leading and trailing whitespace and compress all "in-string" whitespace occurrences to exactly 1 space each
convert_date — convert date to a specified format
crypt — run Unix crypt() function on input data
currency — format number as currency, honoring default or specified locale
date2time — convert date (possibly with specified time) to number of seconds since Epoch
date_change — convert MMDDYYYY date (possibly with specified time) to YYYYMMDDhhmm
datetime2epoch — convert date (possibly with specified time) to number of seconds since Epoch
dbi_quote — safely quote strings for use in SQL statements using DBI's quote method
decode_entities — decode encoded HTML characters back to their unencoded representation
digits — eliminate non-digit characters
digits_dash — eliminate non-digit characters, with the exception of dashes
digits_dot — eliminate non-digit characters, with the exception of dots
dos — convert UNIX or Max ASCII text to DOS format
duration — calculate end date from given start date and duration
encode_entities — encode non-standard HTML characters
encode_special_entities
encrypt — PGP-encrypt input
filesafe — make sure the input is ready for use as a filename
filter_select — automatically select filter based on HTML widget type
gate — return input verbatim if the specified Scratch variable exists, empty string otherwise
hash2acl — convert Interchange ACL hash to string representation
hmac_sha1_hex
html2text — transform basic HTML input to plain-text
integer — return integer value of the input
italics — enclose input in HTML <i> (italic) tag
large — enclose input in HTML <large> tag
last_non_null — return last non-null entry from an input consisting of null-separated fields
lc — transform all input to lowercase
lcfirst — transform first character in input to lowercase
line — output just the first line of input
line2options — replace newlines in input with commas
linkdecode — decode hex-encoded entities found within URLs
liven_urls — make all kinds of URLs clickable
loc — localize provided input
lookup — perform lookup in another database
lspace_to_nbsp — replace leading spaces (" ") with nonbreakable space ("&nbsp;") characters
mac — convert UNIX or DOS ASCII text to Apple Macintosh format
mailto — enclose input in HTML <a href='mailto: ...'> link
md5 — calculate MD5 sum of input
mime_type — print file MIME type, based on file extension
name — transform "Last, First" name format to "First Last"
namecase — transform any "NAME" to "Name"
next_sequential
no_white — eliminate all whitespace in input
null_to_colons — replace \0 (null) characters with double colon "::"
null_to_comma — replace \0 (null) characters with comma ","
null_to_space — replace \0 (null) characters with space " "
nullselect — split input on \0 (null) characters and return first non-empty string
oneline — delete everything after first null or newline character, effectively "onelining" the input
option_format
options2line — replace commas in input with newlines
pagefile — make sure the input is ready for use as an Interchange page filename
pgbool — return "f" (false) or "t" (true), depending on input data
pgbooln — return undef (NULL), "f" (false) or "t" (true), depending on input data
pre — enclose input in HTML <pre> (preformatted) tag
qb_safe — make input safe for QuickBooks by removing unfriendly characters
restrict_html — filter out all but the restricted set of allowed HTML tags in input
roman — transform input integer to Roman numerals
round — round value in floating-point-safe way
sha1 — calculate SHA1 sum of input
show_null — replace null-characters (\0) with literal "\0"
small — enclose input in HTML <small> tag
space_to_nbsp — replace all spaces (" ") with nonbreakable space ("&nbsp;") characters
space_to_null — replace space " " with \0 (null) character
sql — quote strings for use in SQL statements, without referencing a specific database
strftime — transform UNIX time (number of seconds) to a date/time string, according to specified format
strikeout — enclose input in HTML <strike> tag
strip — trim leading and trailing whitespace
strip_html
strip_path
tabbed — replace newlines in input with TAB characters
text2html — transform input plain-text to most basic HTML
textarea_get — replace &amp; (ampersand) entities in input with literal &
textarea_put — replace &, < and [ characters with their encoded representation
tt — enclose input in HTML <tt> (typewriter) tag
uc — transform all input to uppercase
ucfirst — transform first character in input to uppercase
unix — convert DOS or Mac ASCII text to Unix format
upload
urldecode — replace encoded (hex) characters with their unencoded representation
urlencode — replace non-word characters or a colon with encoded (hex) representation
value — expand to value of the UserDB variable specified in body
vars_and_comments — interpolate variables and remove comments
word — eliminate any non-word characters
yesno — return Yes for non-empty input, No otherwise
zerofix — eliminate possible zeros at beginning of input

DocBook! Interchange!