Filtering functions

  1. drupal
    1. 6 modules/filter/filter.module

Functions for interacting with the content filtering system.

For more info, see the hook_filter() documentation.

Note: because filters can inject JavaScript or execute PHP code, security is vital here. When a user supplies a $format, you should validate it with filter_access($format) before accepting/using it. This is normally done in the validation stage of the node system. You should for example never make a preview of content in a disallowed format.

Functions & methods

NameDescription
check_markupRun all the enabled filters on a piece of text.
filter_accessReturns TRUE if the user is allowed to access this format.
filter_formGenerates a selector for choosing a format in a form.
filter_form_validateValidation callback for filter elements in a form.

File

modules/filter/filter.module, line 398
Framework for handling filtering of content.

Login or register to post comments