public static function fromText($text, $mode = null)
    {
        $text = nl2br(htmlentities($text, null, 'utf-8'));

        $text = self::createLinks($text);

        return $text;
    }
public static function fromText($text, $mode = null)
    {
        $text = nl2br(htmlentities($text, null, 'utf-8'));

        $text = self::createLinks($text);

        return $text;
    }
public static function fromText ( $ text , $ mode = null ) { $ text = nl2br ( htmlentities ( $ text , null , 'utf-8' ) ) ; $ text = self :: createLinks ( $ text ) ; return $ text ; }
Creates HTML from a text string, typically for formatting comments.

@param string $text
@param null $mode
@return string
Creates HTML from a text string typically for formatting comments .