App\Libraries\BBCodeFromDB::parseUrl PHP Method

parseUrl() public method

public parseUrl ( $text )
    public function parseUrl($text)
    {
        $text = preg_replace("#\\[url:{$this->uid}\\](.+?)\\[/url:{$this->uid}\\]#", "<a rel='nofollow' href='\\1'>\\1</a>", $text);
        $text = preg_replace("#\\[url=(.+?):{$this->uid}\\]#", "<a rel='nofollow' href='\\1'>", $text);
        $text = str_replace("[/url:{$this->uid}]", '</a>', $text);
        return $text;
    }