function messaging_check_plain in Messaging 5
Same name and namespace in other branches
- 6.4 includes/text.inc \messaging_check_plain()
- 6 messaging.module \messaging_check_plain()
- 6.2 messaging.module \messaging_check_plain()
- 6.3 messaging.module \messaging_check_plain()
HTML to text simple filtering.
Just strip out all HTML tags and decode entities
3 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.
- messaging_html_to_text in ./messaging.module 
- HTML to text conversion
File
- ./messaging.module, line 913 
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;
}