You are here

static function Messaging_Text::check_subject in Messaging 7

Converts strings to plain utf-8 single line

File

messaging_template/messaging_template.inc, line 19
Drupal Messaging Framework - Text filtering functions

Class

Messaging_Text
Message text class.

Code

static function check_subject($text) {
  $text = check_plain($text);

  // taken from _sanitizeHeaders() in PEAR mail() : http://pear.php.net/package/Mail
  $text = preg_replace('=((0x0A/%0A|0x0D/%0D|\\n|\\r)\\S).*=i', NULL, $text);
  return $text;
}