protected function rcdata() {
        if (is_null($this->untilTag)) {
            return $this->text();
        }
        $sequence = '</' . $this->untilTag . '>';
        $txt = '';
        $tok = $this->scanner->current();
        while ($tok !== false && !($tok == '<' && ($this->sequenceMatches($sequence) || $this->sequenceMatches(strtoupper($sequence))))) {
            if ($tok == '&') {
                $txt .= $this->decodeCharacterReference();
                $tok = $this->scanner->current();
            } else {
                $txt .= $tok;
                $tok = $this->scanner->next();
            }
        }
        $this->events->text($txt);
        $this->setTextMode(0);
        return $this->endTag();
    }