protected function quotedAttributeValue($quote) {
        $stoplist = "\f" . $quote;
        $val = '';
        $tok = $this->scanner->current();
        while (strspn($tok, $stoplist) == 0 && $tok !== false) {
            if ($tok == '&') {
                $val .= $this->decodeCharacterReference(true);
                $tok = $this->scanner->current();
            } else {
                $val .= $tok;
                $tok = $this->scanner->next();
            }
        }
        $this->scanner->next();
        return $val;
    }