Merge remote-tracking branch 'callumacrae/ticket/10240' into develop-olympus

* callumacrae/ticket/10240:
  [ticket/10240] Added code to strip control characters from messages.
This commit is contained in:
Oleg Pudeyev 2011-08-09 21:30:37 -04:00
commit cad3e4cb45

View file

@ -691,6 +691,9 @@ function censor_text($text)
return ''; return '';
} }
// Strip control characters
$text = preg_replace('/[\x00-\x0f]/', '', $text);
// We moved the word censor checks in here because we call this function quite often - and then only need to do the check once // We moved the word censor checks in here because we call this function quite often - and then only need to do the check once
if (!isset($censors) || !is_array($censors)) if (!isset($censors) || !is_array($censors))
{ {