StatusNet::filterContent PHP Method

filterContent() public method

public filterContent ( $text ) : string
return string
    public function filterContent($text)
    {
        $text = strip_tags($text);
        $text = preg_replace('/(https?:\\/\\/[^\\s\\)]+)/', '<a href="\\1">\\1</a>', $text);
        $text = preg_replace('/\\#([^\\s\\ \\:\\.\\;\\-\\,\\!\\)\\(\\"]+)/', '<a href="' . $this->root . '/search/notice?q=%23\\1">#\\1</a>', $text);
        $text = preg_replace('/\\@([^\\s\\ \\:\\.\\;\\-\\,\\!\\)\\(\\"]+)/', '@<a href="' . $this->root . '/\\1">\\1</a>', $text);
        $text = '<p>' . $text . '</p>';
        return $text;
    }