You are here

function messaging_check_plain in Messaging 6

Same name and namespace in other branches
  1. 5 messaging.module \messaging_check_plain()
  2. 6.4 includes/text.inc \messaging_check_plain()
  3. 6.2 messaging.module \messaging_check_plain()
  4. 6.3 messaging.module \messaging_check_plain()

HTML to text simple filtering.

Just strip out all HTML tags and decode entities

2 calls to messaging_check_plain()
messaging_check_subject in ./messaging.module
Converts strings to plain utf-8 single line
messaging_filter in ./messaging.module
Implementation of hook_filter(). Contains a basic set of essential filters.

File

./messaging.module, line 741

Code

function messaging_check_plain($text) {

  // This have to be done before the filtering because tag markers may have been previously parsed with check_plain
  $text = str_replace(array(
    '<',
    '>',
  ), array(
    '<',
    '>',
  ), $text);

  // Filters out all HTML tags
  $text = filter_xss($text, array());

  // HTML entities to plain text conversion.
  $text = decode_entities($text);
  return $text;
}