function out($text) { $text = Func::links($text); $text = $this->registry['bb']->out($text); if (strstr($text, '[nosmile]')) { $text = str_replace('[nosmile]', '', $text); } else { $text = $this->registry['smiles']->out($text); } $text = str_replace("<br />", "\n", $text); $text = nl2br($text); $text = preg_replace('#[\\r\\n]#', '', $text); return $text; }