src/thinkextend/parser/driver/Ubb.php
public function parse($content = '')
    {
        if (empty($content)) {
            return '';
        }

        for ($i = 0, $count = count($this->ubb); $i < $count; $i++) {
            if (count($this->ubb[$i]) == 4) {
                //解析闭合标签
                $content = $this->closeTag($content, $this->ubb[$i]);
            } else {
                $content = $this->onceTag($content, $this->ubb[$i]);
            }
        }

        return nl2br($content);
    }
public function parse($content = '')
    {
        if (empty($content)) {
            return '';
        }

        for ($i = 0, $count = count($this->ubb); $i < $count; $i++) {
            if (count($this->ubb[$i]) == 4) {
                //解析闭合标签
                $content = $this->closeTag($content, $this->ubb[$i]);
            } else {
                $content = $this->onceTag($content, $this->ubb[$i]);
            }
        }

        return nl2br($content);
    }
解析UBB代码为HTML
@param  string $content 要解析的UBB代码
@return string          解析后的HTML代码