You are here

function messaging_check_subject in Messaging 6.3

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

Converts strings to plain utf-8 single line

File

./messaging.module, line 577

Code

function messaging_check_subject($text) {
  $text = messaging_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;
}