check_markup

function check_markup

check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE)

Runs all the enabled filters on a piece of text.

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

Parameters

$text: The text to be filtered.

$format_id: (optional) The machine name of the filter format to be used to filter the text. Defaults to the fallback format. See 登录查看完整内容